Skip to content
This repository has been archived by the owner on Apr 19, 2022. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
upgrade to xunit2 beta
  • Loading branch information
aarondandy committed Dec 6, 2014
1 parent 6a8ada6 commit f39d91f
Show file tree
Hide file tree
Showing 20 changed files with 103 additions and 60 deletions.
1 change: 1 addition & 0 deletions build.cmd
@@ -1,4 +1,5 @@
@echo OFF
pushd %~dp0build
scriptcs -install
scriptcs baufile.csx -- %*
popd
5 changes: 3 additions & 2 deletions build/baufile.csx
Expand Up @@ -83,8 +83,9 @@ bau
.DependsOn("create-artifact-folders")
.Do(xunit => {
xunit.Exe = buildPackagesDir
.EnumerateFiles("xunit.console.clr4.exe", SearchOption.AllDirectories)
.Single()
.EnumerateDirectories("xunit.runners.*").Single()
.EnumerateDirectories("tools").Single()
.EnumerateFiles("xunit.console.exe").Single()
.FullName;
xunit.Assemblies = BinaryOutputFolder.EnumerateFiles("*.Test.dll").Select(f => f.FullName);
})
Expand Down
2 changes: 1 addition & 1 deletion build/packages.config
Expand Up @@ -7,5 +7,5 @@
<package id="Bau.Xunit" version="0.1.0-beta06" targetFramework="net45" />
<package id="NuGet.CommandLine" version="2.8.3" />
<package id="ScriptCs.Contracts" version="0.9.0" targetFramework="net45" />
<package id="xunit.runners" version="1.9.2" />
<package id="xunit.runners" version="2.0.0-beta5-build2785" />
</packages>
Expand Up @@ -50,7 +50,7 @@ public static class PolygonDifferenceFacts
return sb.ToString();
}

[Theory, PropertyData("TestPolyDifferenceParameters")]
[Theory, MemberData("TestPolyDifferenceParameters")]
public static void polygon_difference(PolyPairTestData testData) {
Console.WriteLine(testData.Name);

Expand Down
Expand Up @@ -35,7 +35,7 @@ public static class PolygonFindPointCrossingsFacts
return d.GetMagnitudeSquared() < 0.000000000000000001;
}

[Theory, PropertyData("TestPolyCrossingsParameters")]
[Theory, MemberData("TestPolyCrossingsParameters")]
public static void polygon_intersection_point_crossings(PolyPairTestData testData) {
if (testData.Name == "Fuzzed: 3")
return; // NOTE: we must test this one a different way
Expand Down
Expand Up @@ -51,7 +51,7 @@ public static class PolygonIntersectionFacts
return sb.ToString();
}

[Theory, PropertyData("TestPolyIntersectionParameters")]
[Theory, MemberData("TestPolyIntersectionParameters")]
public static void polygon_intersection(PolyPairTestData testData) {
Console.WriteLine(testData.Name);

Expand Down Expand Up @@ -98,7 +98,7 @@ public static class PolygonIntersectionFacts
: new Ring2(r.Reverse());
}

[Theory, PropertyData("TestPolyIntersectionParameters")]
[Theory, MemberData("TestPolyIntersectionParameters")]
public static void polygon_intersection_reverse_winding(PolyPairTestData testData) {
Console.WriteLine(testData.Name);

Expand Down
Expand Up @@ -50,7 +50,7 @@ public static class PolygonUnionFacts
return sb.ToString();
}

[Theory, PropertyData("TestPolyUnionParameters")]
[Theory, MemberData("TestPolyUnionParameters")]
public static void polygon_union(PolyPairTestData testData) {
Console.WriteLine(testData.Name);

Expand Down
Expand Up @@ -50,7 +50,7 @@ public static class PolygonXorFacts
return sb.ToString();
}

[Theory, PropertyData("TestPolyXorParameters")]
[Theory, MemberData("TestPolyXorParameters")]
public static void polygon_xor(PolyPairTestData testData) {
Console.WriteLine(testData.Name);

Expand Down
Expand Up @@ -14,7 +14,5 @@
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

[assembly: CLSCompliant(true)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("a357fd23-7ca6-4384-b099-e8a140fd0761")]
Expand Up @@ -35,7 +35,7 @@ public static class RingFindPointCrossingsTest
return d.GetMagnitudeSquared() < 0.000000000000000001;
}

[Theory, PropertyData("TestRingCrossingsParameters")]
[Theory, MemberData("TestRingCrossingsParameters")]
public static void ring_point_crossings(RingPairTestData testData) {
if (testData.Name == "Fuzzed: 3")
return; // must test this a different way
Expand Down
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\packages\xunit.core.2.0.0-beta5-build2785\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid\xunit.core.props" Condition="Exists('..\..\packages\xunit.core.2.0.0-beta5-build2785\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid\xunit.core.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
Expand All @@ -10,9 +11,11 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Vertesaur.PolygonOperation.Test</RootNamespace>
<AssemblyName>Vertesaur.Core.PolygonOperation.Test</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>b410a18e</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -24,6 +27,7 @@
<WarningLevel>4</WarningLevel>
<DocumentationFile>
</DocumentationFile>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand All @@ -34,6 +38,7 @@
<WarningLevel>4</WarningLevel>
<DocumentationFile>
</DocumentationFile>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugCC|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -43,6 +48,7 @@
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="FluentAssertions, Version=3.2.1.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
Expand All @@ -59,13 +65,14 @@
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="xunit, Version=1.9.2.1705, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\xunit.1.9.2\lib\net20\xunit.dll</HintPath>
<Reference Include="xunit.abstractions">
<HintPath>..\..\packages\xunit.abstractions.2.0.0-beta5-build2785\lib\net35\xunit.abstractions.dll</HintPath>
</Reference>
<Reference Include="xunit.extensions, Version=1.9.2.1705, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll</HintPath>
<Reference Include="xunit.assert">
<HintPath>..\..\packages\xunit.assert.2.0.0-beta5-build2785\lib\portable-net45+aspnetcore50+win+wpa81+wp80+monoandroid+monotouch10\xunit.assert.dll</HintPath>
</Reference>
<Reference Include="xunit.core">
<HintPath>..\..\packages\xunit.core.2.0.0-beta5-build2785\lib\portable-net45+aspnetcore50+win+wpa81+wp80+monotouch+monoandroid\xunit.core.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down Expand Up @@ -96,6 +103,12 @@
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\xunit.core.2.0.0-beta5-build2785\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid\xunit.core.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\xunit.core.2.0.0-beta5-build2785\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid\xunit.core.props'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
8 changes: 5 additions & 3 deletions tests/Vertesaur.Core.PolygonOperation.Test/packages.config
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="FluentAssertions" version="3.2.1" targetFramework="net40" />
<package id="xunit" version="1.9.2" targetFramework="net40" />
<package id="xunit.extensions" version="1.9.2" targetFramework="net40" />
<package id="FluentAssertions" version="3.2.1" targetFramework="net40" requireReinstallation="True" />
<package id="xunit" version="2.0.0-beta5-build2785" targetFramework="net451" />
<package id="xunit.abstractions" version="2.0.0-beta5-build2785" targetFramework="net451" />
<package id="xunit.assert" version="2.0.0-beta5-build2785" targetFramework="net451" />
<package id="xunit.core" version="2.0.0-beta5-build2785" targetFramework="net451" />
</packages>
2 changes: 1 addition & 1 deletion tests/Vertesaur.Core.Test/Matrix2Facts.cs
Expand Up @@ -146,7 +146,7 @@ public static class Matrix2Facts
}
}

[Theory, PropertyData("DeterminantsData")]
[Theory, MemberData("DeterminantsData")]
public static void determinants(double expectedDeterminant, Matrix2 m) {
var determinant = m.CalculateDeterminant();

Expand Down
2 changes: 1 addition & 1 deletion tests/Vertesaur.Core.Test/Matrix3Facts.cs
Expand Up @@ -211,7 +211,7 @@ public static class Matrix3Facts
}
}

[Theory, PropertyData("DeterminantsData")]
[Theory, MemberData("DeterminantsData")]
public static void determinant(double expectedDeterminant, Matrix3 m) {
var determinant = m.CalculateDeterminant();

Expand Down
2 changes: 0 additions & 2 deletions tests/Vertesaur.Core.Test/Properties/AssemblyInfo.cs
Expand Up @@ -14,7 +14,5 @@
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

[assembly: CLSCompliant(true)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("b1f7426d-37d8-4fa9-9252-8f299abb84c1")]
26 changes: 20 additions & 6 deletions tests/Vertesaur.Core.Test/Vertesaur.Core.Test.csproj
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\packages\xunit.core.2.0.0-beta5-build2785\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid\xunit.core.props" Condition="Exists('..\..\packages\xunit.core.2.0.0-beta5-build2785\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid\xunit.core.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
Expand All @@ -10,10 +11,11 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Vertesaur.Test</RootNamespace>
<AssemblyName>Vertesaur.Core.Test</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<NuGetPackageImportStamp>594b9d6d</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -25,6 +27,7 @@
<WarningLevel>4</WarningLevel>
<DocumentationFile>
</DocumentationFile>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand All @@ -35,6 +38,7 @@
<WarningLevel>4</WarningLevel>
<DocumentationFile>
</DocumentationFile>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugCC|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -44,6 +48,7 @@
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="FluentAssertions">
Expand All @@ -58,11 +63,14 @@
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="xunit">
<HintPath>..\..\packages\xunit.1.9.2\lib\net20\xunit.dll</HintPath>
<Reference Include="xunit.abstractions">
<HintPath>..\..\packages\xunit.abstractions.2.0.0-beta5-build2785\lib\net35\xunit.abstractions.dll</HintPath>
</Reference>
<Reference Include="xunit.extensions">
<HintPath>..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll</HintPath>
<Reference Include="xunit.assert">
<HintPath>..\..\packages\xunit.assert.2.0.0-beta5-build2785\lib\portable-net45+aspnetcore50+win+wpa81+wp80+monoandroid+monotouch10\xunit.assert.dll</HintPath>
</Reference>
<Reference Include="xunit.core">
<HintPath>..\..\packages\xunit.core.2.0.0-beta5-build2785\lib\portable-net45+aspnetcore50+win+wpa81+wp80+monotouch+monoandroid\xunit.core.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down Expand Up @@ -105,6 +113,12 @@
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\xunit.core.2.0.0-beta5-build2785\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid\xunit.core.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\xunit.core.2.0.0-beta5-build2785\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid\xunit.core.props'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
8 changes: 5 additions & 3 deletions tests/Vertesaur.Core.Test/packages.config
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="FluentAssertions" version="3.2.1" targetFramework="net40" />
<package id="xunit" version="1.9.2" targetFramework="net40" />
<package id="xunit.extensions" version="1.9.2" targetFramework="net40" />
<package id="FluentAssertions" version="3.2.1" targetFramework="net40" requireReinstallation="True" />
<package id="xunit" version="2.0.0-beta5-build2785" targetFramework="net451" />
<package id="xunit.abstractions" version="2.0.0-beta5-build2785" targetFramework="net451" />
<package id="xunit.assert" version="2.0.0-beta5-build2785" targetFramework="net451" />
<package id="xunit.core" version="2.0.0-beta5-build2785" targetFramework="net451" />
</packages>

0 comments on commit f39d91f

Please sign in to comment.