Permalink
Browse files

Migrate unit tests to XUnit

  • Loading branch information...
1 parent 8da9472 commit 3e9348985d071912f0dfca41ea03251fe74093ef @nulltoken nulltoken committed Feb 28, 2012
Showing with 3,926 additions and 18,037 deletions.
  1. +3 −3 CI-build.msbuild
  2. +0 −277 Lib/NUnit/NUnitFitTests.html
  3. +0 −124 Lib/NUnit/NUnitTests.VisualState.xml
  4. +0 −85 Lib/NUnit/NUnitTests.config
  5. +0 −14 Lib/NUnit/NUnitTests.nunit
  6. +0 −5,971 Lib/NUnit/TestResult.xml
  7. +0 −4 Lib/NUnit/agent.conf
  8. +0 −18 Lib/NUnit/agent.log.conf
  9. BIN Lib/NUnit/framework/nunit.framework.dll
  10. +0 −10,407 Lib/NUnit/framework/nunit.framework.xml
  11. BIN Lib/NUnit/framework/nunit.mocks.dll
  12. BIN Lib/NUnit/framework/pnunit.framework.dll
  13. +0 −18 Lib/NUnit/launcher.log.conf
  14. BIN Lib/NUnit/lib/Failure.png
  15. BIN Lib/NUnit/lib/Ignored.png
  16. BIN Lib/NUnit/lib/Inconclusive.png
  17. BIN Lib/NUnit/lib/Skipped.png
  18. BIN Lib/NUnit/lib/Success.png
  19. BIN Lib/NUnit/lib/fit.dll
  20. BIN Lib/NUnit/lib/log4net.dll
  21. BIN Lib/NUnit/lib/nunit-console-runner.dll
  22. BIN Lib/NUnit/lib/nunit-gui-runner.dll
  23. BIN Lib/NUnit/lib/nunit.core.dll
  24. BIN Lib/NUnit/lib/nunit.core.interfaces.dll
  25. BIN Lib/NUnit/lib/nunit.fixtures.dll
  26. BIN Lib/NUnit/lib/nunit.uiexception.dll
  27. BIN Lib/NUnit/lib/nunit.uikit.dll
  28. BIN Lib/NUnit/lib/nunit.util.dll
  29. BIN Lib/NUnit/nunit-agent-x86.exe
  30. +0 −69 Lib/NUnit/nunit-agent-x86.exe.config
  31. BIN Lib/NUnit/nunit-agent.exe
  32. +0 −69 Lib/NUnit/nunit-agent.exe.config
  33. BIN Lib/NUnit/nunit-console-x86.exe
  34. +0 −69 Lib/NUnit/nunit-console-x86.exe.config
  35. BIN Lib/NUnit/nunit-console.exe
  36. +0 −69 Lib/NUnit/nunit-console.exe.config
  37. BIN Lib/NUnit/nunit-x86.exe
  38. +0 −83 Lib/NUnit/nunit-x86.exe.config
  39. BIN Lib/NUnit/nunit.exe
  40. +0 −83 Lib/NUnit/nunit.exe.config
  41. BIN Lib/NUnit/nunit.framework.dll
  42. BIN Lib/NUnit/pnunit-agent.exe
  43. +0 −77 Lib/NUnit/pnunit-agent.exe.config
  44. BIN Lib/NUnit/pnunit-launcher.exe
  45. +0 −77 Lib/NUnit/pnunit-launcher.exe.config
  46. BIN Lib/NUnit/pnunit.framework.dll
  47. BIN Lib/NUnit/pnunit.tests.dll
  48. BIN Lib/NUnit/runFile.exe
  49. +0 −43 Lib/NUnit/runFile.exe.config
  50. +0 −2 Lib/NUnit/runpnunit.bat
  51. +0 −24 Lib/NUnit/test.conf
  52. BIN Lib/NUnit/tests/loadtest-assembly.dll
  53. BIN Lib/NUnit/tests/mock-assembly.dll
  54. BIN Lib/NUnit/tests/nonamespace-assembly.dll
  55. BIN Lib/NUnit/tests/nunit-console.tests.dll
  56. BIN Lib/NUnit/tests/nunit-gui.tests.dll
  57. BIN Lib/NUnit/tests/nunit.core.tests.dll
  58. BIN Lib/NUnit/tests/nunit.fixtures.tests.dll
  59. BIN Lib/NUnit/tests/nunit.framework.dll
  60. BIN Lib/NUnit/tests/nunit.framework.tests.dll
  61. BIN Lib/NUnit/tests/nunit.mocks.tests.dll
  62. BIN Lib/NUnit/tests/nunit.uiexception.tests.dll
  63. BIN Lib/NUnit/tests/nunit.uikit.tests.dll
  64. BIN Lib/NUnit/tests/nunit.util.tests.dll
  65. BIN Lib/NUnit/tests/test-assembly.dll
  66. BIN Lib/NUnit/tests/test-utilities.dll
  67. BIN Lib/NUnit/tests/timing-tests.dll
  68. BIN Lib/xUnit/xunit.dll
  69. +5 −0 Lib/xUnit/xunit.dll.tdnet
  70. BIN Lib/xUnit/xunit.extensions.dll
  71. +805 −0 Lib/xUnit/xunit.extensions.xml
  72. BIN Lib/xUnit/xunit.runner.msbuild.dll
  73. BIN Lib/xUnit/xunit.runner.tdnet.dll
  74. BIN Lib/xUnit/xunit.runner.utility.dll
  75. +2,604 −0 Lib/xUnit/xunit.xml
  76. +7 −8 LibGit2Sharp.Tests/BlobFixture.cs
  77. +44 −42 LibGit2Sharp.Tests/BranchFixture.cs
  78. +47 −48 LibGit2Sharp.Tests/CommitFixture.cs
  79. +27 −28 LibGit2Sharp.Tests/ConfigurationFixture.cs
  80. +41 −36 LibGit2Sharp.Tests/EpochFixture.cs
  81. +60 −51 LibGit2Sharp.Tests/IndexFixture.cs
  82. +4 −5 LibGit2Sharp.Tests/LazyFixture.cs
  83. +8 −3 LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj
  84. +26 −24 LibGit2Sharp.Tests/ObjectIdFixture.cs
  85. +42 −43 LibGit2Sharp.Tests/ReferenceFixture.cs
  86. +5 −6 LibGit2Sharp.Tests/RemoteFixture.cs
  87. +30 −31 LibGit2Sharp.Tests/RepositoryFixture.cs
  88. +12 −11 LibGit2Sharp.Tests/ResetFixture.cs
  89. +9 −9 LibGit2Sharp.Tests/StatusFixture.cs
  90. +63 −64 LibGit2Sharp.Tests/TagFixture.cs
  91. +13 −13 LibGit2Sharp.Tests/TestHelpers/AssertExtensions.cs
  92. +4 −5 LibGit2Sharp.Tests/TestHelpers/BaseFixture.cs
  93. +14 −0 LibGit2Sharp.Tests/TestHelpers/SkipException.cs
  94. +31 −0 LibGit2Sharp.Tests/TestHelpers/SkippableFactAttribute.cs
  95. +14 −15 LibGit2Sharp.Tests/TreeFixture.cs
  96. +8 −9 LibGit2Sharp.Tests/TupleFixture.cs
View
@@ -4,9 +4,10 @@
<RootDir>$(MSBuildProjectDirectory)</RootDir>
<TestBuildDir>$(RootDir)\LibGit2Sharp.Tests\bin\$(Configuration)</TestBuildDir>
<DeployFolder>$(RootDir)\Build</DeployFolder>
- <ManagedExeLauncher Condition="('$(OS)' != 'Windows_NT')">mono </ManagedExeLauncher>
</PropertyGroup>
+ <UsingTask AssemblyFile="$(MSBuildProjectDirectory)/Lib/xUnit/xunit.runner.msbuild.dll"
+ TaskName="Xunit.Runner.MSBuild.xunit" />
<Target Name="Clean">
<!-- Workaround for xbuild -->
<Exec Condition=" ('$(OS)' != 'Windows_NT') " Command=" rm -r -f $(DeployFolder) " />
@@ -28,8 +29,7 @@
</Target>
<Target Name="Test" DependsOnTargets="Build">
- <Exec
- Command="$(ManagedExeLauncher) &quot;$(MSBuildProjectDirectory)/Lib/NUnit/nunit-console-x86.exe&quot; &quot;$(TestBuildDir)/LibGit2Sharp.Tests.dll&quot; -xml=&quot;$(DeployFolder)/Test-result.xml&quot; -nologo" />
+ <xunit Assembly="$(TestBuildDir)/LibGit2Sharp.Tests.dll" Xml="$(DeployFolder)/Test-result.xml" />
</Target>
<Target Name="Deploy" DependsOnTargets="Test">
@@ -1,277 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
- <body>
- <h1>NUnit Acceptance Tests</h1>
- <p>
- Developers love self-referential programs! Hence, NUnit has always run all it's
- own tests, even those that are not really unit tests.
- <p>Now, beginning with NUnit 2.4, NUnit has top-level tests using Ward Cunningham's
- FIT framework. At this time, the tests are pretty rudimentary, but it's a start
- and it's a framework for doing more.
- <h2>Running the Tests</h2>
- <p>Open a console or shell window and navigate to the NUnit bin directory, which
- contains this file. To run the test under Microsoft .Net, enter the command
- <pre> runFile NUnitFitTests.html TestResults.html .</pre>
- To run it under Mono, enter
- <pre> mono runFile.exe NUnitFitTests.html TestResults.html .</pre>
- Note the space and dot at the end of each command. The results of your test
- will be in TestResults.html in the same directory.
- <h2>Platform and CLR Version</h2>
- <table BORDER cellSpacing="0" cellPadding="5">
- <tr>
- <td colspan="2">NUnit.Fixtures.PlatformInfo</td>
- </tr>
- </table>
- <h2>Verify Unit Tests</h2>
- <p>
- Load and run the NUnit unit tests, verifying that the results are as expected.
- When these tests are run on different platforms, different numbers of tests may
- be skipped, so the values for Skipped and Run tests are informational only.
- <p>
- The number of tests in each assembly should be constant across all platforms -
- any discrepancy usually means that one of the test source files was not
- compiled on the platform. There should be no failures and no tests ignored.
- <p><b>Note:</b>
- At the moment, the nunit.extensions.tests assembly is failing because the
- fixture doesn't initialize addins in the test domain.
- <p>
- <table BORDER cellSpacing="0" cellPadding="5">
- <tr>
- <td colspan="6">NUnit.Fixtures.AssemblyRunner</td>
- </tr>
- <tr>
- <td>Assembly</td>
- <td>Tests()</td>
- <td>Run()</td>
- <td>Skipped()</td>
- <td>Ignored()</td>
- <td>Failures()</td>
- </tr>
- <tr>
- <td>nunit.framework.tests.dll</td>
- <td>397</td>
- <td>&nbsp;</td>
- <td>&nbsp;</td>
- <td>0</td>
- <td>0</td>
- </tr>
- <tr>
- <td>nunit.core.tests.dll</td>
- <td>355</td>
- <td>&nbsp;</td>
- <td>&nbsp;</td>
- <td>0</td>
- <td>0</td>
- </tr>
- <tr>
- <td>nunit.util.tests.dll</td>
- <td>238</td>
- <td>&nbsp;</td>
- <td>&nbsp;</td>
- <td>0</td>
- <td>0</td>
- </tr>
- <tr>
- <td>nunit.mocks.tests.dll</td>
- <td>43</td>
- <td>&nbsp;</td>
- <td>&nbsp;</td>
- <td>0</td>
- <td>0</td>
- </tr>
- <tr>
- <td>nunit.extensions.tests.dll</td>
- <td>5</td>
- <td>&nbsp;</td>
- <td>&nbsp;</td>
- <td>0</td>
- <td>0</td>
- </tr>
- <tr>
- <td>nunit-console.tests.dll</td>
- <td>40</td>
- <td>&nbsp;</td>
- <td>&nbsp;</td>
- <td>0</td>
- <td>0</td>
- </tr>
- <tr>
- <td>nunit.uikit.tests.dll</td>
- <td>34</td>
- <td>&nbsp;</td>
- <td>&nbsp;</td>
- <td>0</td>
- <td>0</td>
- </tr>
- <tr>
- <td>nunit-gui.tests.dll</td>
- <td>15</td>
- <td>&nbsp;</td>
- <td>&nbsp;</td>
- <td>0</td>
- <td>0</td>
- </tr>
- <tr>
- <td>nunit.fixtures.tests.dll</td>
- <td>6</td>
- <td>&nbsp;</td>
- <td>&nbsp;</td>
- <td>0</td>
- <td>0</td>
- </tr>
- </table>
- <h2>Code Snippet Tests</h2>
- <p>
- These tests create a test assembly from a snippet of code and then load and run
- the tests that it contains, verifying that the structure of the loaded tests is
- as expected and that the number of tests run, skipped, ignored or failed is
- correct.
- <p>
- <table BORDER cellSpacing="0" cellPadding="5">
- <tr>
- <td colspan="6">NUnit.Fixtures.SnippetRunner</td>
- </tr>
- <tr>
- <td>Code</td>
- <td>Tree()</td>
- <td>Run()</td>
- <td>Skipped()</td>
- <td>Ignored()</td>
- <td>Failures()</td>
- </tr>
- <tr>
- <td><pre>public class TestClass
-{
-}</pre>
- </td>
- <td>EMPTY</td>
- <td>0</td>
- <td>0</td>
- <td>0</td>
- <td>0</td>
- </tr>
- <tr>
- <td><pre>using NUnit.Framework;
-
-[TestFixture]
-public class TestClass
-{
-}</pre>
- </td>
- <td>TestClass</td>
- <td>0</td>
- <td>0</td>
- <td>0</td>
- <td>0</td>
- </tr>
- <tr>
- <td><pre>using NUnit.Framework;
-
-[TestFixture]
-public class TestClass
-{
- [Test]
- public void T1() { }
- [Test]
- public void T2() { }
- [Test]
- public void T3() { }
-}</pre>
- </td>
- <td><pre>TestClass
-&gt;T1
-&gt;T2
-&gt;T3</pre>
- </td>
- <td>3</td>
- <td>0</td>
- <td>0</td>
- <td>0</td>
- </tr>
- <tr>
- <td><pre>using NUnit.Framework;
-
-[TestFixture]
-public class TestClass1
-{
- [Test]
- public void T1() { }
-}
-
-[TestFixture]
-public class TestClass2
-{
- [Test]
- public void T2() { }
- [Test]
- public void T3() { }
-}</pre>
- </td>
- <td><pre>TestClass1
-&gt;T1
-TestClass2
-&gt;T2
-&gt;T3</pre>
- </td>
- <td>3</td>
- <td>0</td>
- <td>0</td>
- <td>0</td>
- </tr>
- <tr>
- <td><pre>using NUnit.Framework;
-
-[TestFixture]
-public class TestClass
-{
- [Test]
- public void T1() { }
- [Test, Ignore]
- public void T2() { }
- [Test]
- public void T3() { }
-}</pre>
- </td>
- <td><pre>TestClass
-&gt;T1
-&gt;T2
-&gt;T3</pre>
- </td>
- <td>2</td>
- <td>0</td>
- <td>1</td>
- <td>0</td>
- </tr>
- <tr>
- <td><pre>using NUnit.Framework;
-
-[TestFixture]
-public class TestClass
-{
- [Test]
- public void T1() { }
- [Test, Explicit]
- public void T2() { }
- [Test]
- public void T3() { }
-}</pre>
- </td>
- <td><pre>TestClass
-&gt;T1
-&gt;T2
-&gt;T3</pre>
- </td>
- <td>2</td>
- <td>1</td>
- <td>0</td>
- <td>0</td>
- </tr>
- </table>
- <h2>Summary Information</h2>
- <table BORDER cellSpacing="0" cellPadding="5">
- <tr>
- <td colspan="2">fit.Summary</td>
- </tr>
- </table>
- </body>
-</html>
Oops, something went wrong.

0 comments on commit 3e93489

Please sign in to comment.