知道如何在“内部"上运行智能测试吗?班级 [英] Any idea how I can run Intellitests on "internal" classes

查看:23
本文介绍了知道如何在“内部"上运行智能测试吗?班级的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个库,该库将成为伞库使用的许多库的一部分,这些库都使用 internalsVisibleTo("{umbrella-library}") 构建.

I'm building a library that will be a part of a number of libraries that will be used by an umbrella library to which they all are built with an internalsVisibleTo("{umbrella-library}").

我想探索我正在使用新的 Microsoft Intellitetest 构建的库,但它似乎不适用于内部类,因为这些方法不是公开可见的(即使它们是单独公开的).

I would like to explore the libraries I'm building with the new Microsoft Intellitest, but seems it doesn't work on internal classes because the methods are not publicly visible (even though they are singularly public).

有什么建议吗?

推荐答案

以下是使用 IntelliTest 探索内部类型的方法:(1) 首先在所需方法上调用Create IntelliTest"命令,以便发出具有所需 PUT 和属性的测试项目.(2) 接下来,像往常一样在所需的方法或(刚刚发出的)PUT 上调用 Run IntelliTest 命令.

Here is how to use IntelliTest to explore internal types: (1) Invoke the "Create IntelliTest" command on the desired method first so that a test project with the required PUT and attributes are emitted. (2) Next, invoke the Run IntelliTest command either on the desired method or the (just emitted) PUT as usual.

请看这篇文章(http://blogs.msdn.com/b/visualstudioalm/archive/2015/07/25/unit-test-generators-extensibility-hats-off-to-our-community.aspx) 的基本原理.

Please see this post (http://blogs.msdn.com/b/visualstudioalm/archive/2015/07/25/unit-test-generators-extensibility-hats-off-to-our-community.aspx) for rationale.

这篇关于知道如何在“内部"上运行智能测试吗?班级的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆