Skip to content

Commit

Permalink
Update main test project to xUnit 2.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
stakx committed Oct 14, 2017
1 parent d3ce1b8 commit 90e5490
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
16 changes: 8 additions & 8 deletions UnitTests/MockBehaviorFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public void ShouldReturnEmptyArrayOnLoose()
var mock = new Mock<IFoo>(MockBehavior.Loose);

Assert.NotNull(mock.Object.GetArray());
Assert.Equal(0, mock.Object.GetArray().Length);
Assert.Empty(mock.Object.GetArray());
}

[Fact]
Expand All @@ -56,7 +56,7 @@ public void ShouldReturnEmptyArrayTwoDimensionsOnLoose()
var mock = new Mock<IFoo>(MockBehavior.Loose);

Assert.NotNull(mock.Object.GetArrayTwoDimensions());
Assert.Equal(0, mock.Object.GetArrayTwoDimensions().Length);
Assert.Empty(mock.Object.GetArrayTwoDimensions());
}

[Fact]
Expand All @@ -73,7 +73,7 @@ public void ShouldReturnEmptyEnumerableStringOnLoose()
var mock = new Mock<IFoo>(MockBehavior.Loose);

Assert.NotNull(mock.Object.GetEnumerable());
Assert.Equal(0, mock.Object.GetEnumerable().Count());
Assert.Empty(mock.Object.GetEnumerable());
}

[Fact]
Expand All @@ -82,7 +82,7 @@ public void ShouldReturnEmptyEnumerableObjectsOnLoose()
var mock = new Mock<IFoo>(MockBehavior.Loose);

Assert.NotNull(mock.Object.GetEnumerableObjects());
Assert.Equal(0, mock.Object.GetEnumerableObjects().Cast<object>().Count());
Assert.Empty(mock.Object.GetEnumerableObjects().Cast<object>());
}

[Fact]
Expand Down Expand Up @@ -140,7 +140,7 @@ public void ReturnsEmptyArrayOnLooseWithMockDefaultValue()
var mock = new Mock<IFoo>(MockBehavior.Loose) { DefaultValue = DefaultValue.Mock };

Assert.NotNull(mock.Object.GetArray());
Assert.Equal(0, mock.Object.GetArray().Length);
Assert.Empty(mock.Object.GetArray());
}

[Fact]
Expand All @@ -149,7 +149,7 @@ public void ReturnsEmptyArrayTwoDimensionsOnLooseWithMockDefaultValue()
var mock = new Mock<IFoo>(MockBehavior.Loose) { DefaultValue = DefaultValue.Mock };

Assert.NotNull(mock.Object.GetArrayTwoDimensions());
Assert.Equal(0, mock.Object.GetArrayTwoDimensions().Length);
Assert.Empty(mock.Object.GetArrayTwoDimensions());
}

[Fact]
Expand All @@ -172,7 +172,7 @@ public void ReturnsEmptyEnumerableStringOnLooseWithMockDefaultValue()
var mock = new Mock<IFoo>(MockBehavior.Loose) { DefaultValue = DefaultValue.Mock };

Assert.NotNull(mock.Object.GetEnumerable());
Assert.Equal(0, mock.Object.GetEnumerable().Count());
Assert.Empty(mock.Object.GetEnumerable());
}

[Fact]
Expand All @@ -190,7 +190,7 @@ public void ReturnsEmptyEnumerableObjectsOnLooseWithMockDefaultValue()
var mock = new Mock<IFoo>(MockBehavior.Loose) { DefaultValue = DefaultValue.Mock };

Assert.NotNull(mock.Object.GetEnumerableObjects());
Assert.Equal(0, mock.Object.GetEnumerableObjects().Cast<object>().Count());
Assert.Empty(mock.Object.GetEnumerableObjects().Cast<object>());
}

[Fact]
Expand Down
16 changes: 8 additions & 8 deletions UnitTests/Moq.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net452;netcoreapp1.0</TargetFrameworks>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
<AssemblyName>Moq.Tests</AssemblyName>
<AssemblyOriginatorKeyFile>../Moq.snk</AssemblyOriginatorKeyFile>
<DebugSymbols>True</DebugSymbols>
Expand All @@ -11,28 +11,28 @@
<SignAssembly>true</SignAssembly>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net452' ">
<PropertyGroup Condition=" '$(TargetFramework)' == 'net46' ">
<DefineConstants>$(DefineConstants);DESKTOP;FEATURE_CAS;FEATURE_CODEDOM;FEATURE_COM;FEATURE_SERIALIZATION</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
<DefineConstants>$(DefineConstants);NETCORE</DefineConstants>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Castle.Core" Version="4.2.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />
<PackageReference Include="xunit" Version="2.3.0-beta3-build3705" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.0-beta3-build3705" />
<PackageReference Include="xunit" Version="2.3.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.0" />
<ProjectReference Include="..\Source\Moq.csproj" />
<ProjectReference Include="Library\ClassLibrary1\ClassLibrary1.csproj" />
<ProjectReference Include="Library\ClassLibrary2\ClassLibrary2.csproj" />
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.0-beta3-build3705" />
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.0" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net452' ">
<ItemGroup Condition=" '$(TargetFramework)' == 'net46' ">
<Reference Include="System.Web" />
<Reference Include="System.Windows.Forms" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' ">
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
<PackageReference Include="System.Collections.Specialized" Version="4.3.0" />
<PackageReference Include="System.ComponentModel.Primitives" Version="4.3.0" />
<PackageReference Include="System.Diagnostics.TraceSource" Version="4.3.0" />
Expand Down
4 changes: 2 additions & 2 deletions packages.config
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="GitInfo" version="1.1.15" targetFramework="net45" />
<package id="xunit" version="2.3.0-beta3-build3705" />
<package id="dotnet-xunit" version="2.3.0-beta3-build3705" />
<package id="xunit" version="2.3.0" />
<package id="dotnet-xunit" version="2.3.0" />
<package id="OpenCover" version="4.6.166" targetFramework="net45" />
<package id="coveralls.io" version="1.3.4" targetFramework="net45" />
</packages>

0 comments on commit 90e5490

Please sign in to comment.