Updated tests and project to work #4
This commit is contained in:
Родитель
2257978aa5
Коммит
9f3a998281
|
@ -3,14 +3,7 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp1.1</TargetFramework>
|
<TargetFramework>netcoreapp1.1</TargetFramework>
|
||||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||||
</PropertyGroup>
|
<LagVersion>latest</LagVersion>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
|
||||||
<OutputPath>bin\Debug\</OutputPath>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
|
||||||
<OutputPath>bin\Release\</OutputPath>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -27,8 +20,9 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" />
|
||||||
<PackageReference Include="NUnit" Version="3.7.1" />
|
<PackageReference Include="NUnit" Version="3.9.0" />
|
||||||
|
<PackageReference Include="NUnit3TestAdapter" Version="3.9.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -27,14 +27,16 @@ namespace NUnitTestDemo
|
||||||
[SetUp]
|
[SetUp]
|
||||||
public void CreateList()
|
public void CreateList()
|
||||||
{
|
{
|
||||||
this.list = new TList();
|
list = new TList();
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void CanAddToList()
|
public void CanAddToList()
|
||||||
{
|
{
|
||||||
list.Add(1); list.Add(2); list.Add(3);
|
list.Add(1);
|
||||||
Assert.AreEqual(3, list.Count);
|
list.Add(2);
|
||||||
|
list.Add(3);
|
||||||
|
Assert.That(list.Count,Is.EqualTo(3));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using NUnit.Framework.Internal;
|
|
||||||
using NUnit.Framework.Interfaces;
|
|
||||||
|
|
||||||
#if NETCOREAPP1_1
|
#if NETCOREAPP1_1
|
||||||
namespace NUnitCoreTestDemo
|
namespace NUnitCoreTestDemo
|
||||||
|
@ -123,6 +119,11 @@ namespace NUnitTestDemo
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[TestCase(TestName = "{c.m}")]
|
||||||
|
public void TestCaseWithRandomParameterWithFixedNaming([Random(1)] int x)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
#if false // Test for issue #144
|
#if false // Test for issue #144
|
||||||
[MyTestCase]
|
[MyTestCase]
|
||||||
public void TestCaseWithBadTestBuilder(string baz)
|
public void TestCaseWithBadTestBuilder(string baz)
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
|
|
||||||
#if NETCOREAPP1_1
|
#if NETCOREAPP1_1
|
||||||
|
|
Загрузка…
Ссылка в новой задаче