这是我的配置:
Visual Studio Enterprise 2015
NUnit 3.2.1
NUnit3测试适配器3.0.10 (作为扩展和更新安装,并通过项目中的nuget包管理器安装)
目标框架设置为4.5
构建成功很好,但是测试发现显示了错误,并且发现了0条测试。
错误日志:
Exception NUnit.Engine.NUnitEngineException, Exception thrown discovering tests in C:\projects\~
The NUnit 3.0 driver does not support the por
I NuGetted NUnit (v3.0.1)和NUnit测试适配器(v2.0.0)进入我的VS 2013项目,然后编写了一个允许我运行测试的类:
using NUnit.Framework;
namespace RoboReporter
{
[TestFixture]
public class NUnitTest
{
[Test]
public void Testy()
{
DateTime pseudoRandomDate = new DateTime(2016, 02, 24);
我在Visual 2013中使用NUnit测试。我们使用NUnitTestAdapter将NUnit的测试运行与Visual集成。
Visual 2013 NUnit is version="3.0.1“NUnitTestAdapter version="2.0.0”.Net框架4.5.2
所有软件包都是最新的&安装自Nuget。没有生成错误。我们在测试结果窗口中出现了错误:
Attempt to load assembly with unsupported test framework in D:\JuniorAchievement\Git\jaums\JA.UMS
我可以访问一个A类,一个第三方的具体类,我不能修改。
我想把B类的类似对象转换为第三方的具体对象。我不知道该怎么做才能正确
现在我有
public class BAdapter {
private B b;
public BAdapter(B b) {
this.b = b;
}
public A toClassA() {
// convert to and return an instance of A
}
}
感觉这个适配器类应该是静态的,这使得它更像是一个反模式。
我有很多来自第三方的类,我需要转换这些类,并且想知道我应该使用