Browse files

Replace xUnit test framework with Fixie.

  • Loading branch information...
1 parent 6cb4948 commit 17b974de096e728ee887c22eb93a11b5fa2f462e @plioi committed Apr 13, 2013
Showing with 7 additions and 142 deletions.
  1. +2 −2 default.ps1
  2. +0 −1 src/.nuget/packages.config
  3. +0 −1 src/Rook.Test/Compiling/CSharpCompilerTests.cs
  4. +0 −1 src/Rook.Test/Compiling/CodeGeneration/CSharpTranslatorTests.cs
  5. +0 −1 src/Rook.Test/Compiling/CodeGeneration/CodeWriterTests.cs
  6. +0 −1 src/Rook.Test/Compiling/CompilerResultTests.cs
  7. +0 −1 src/Rook.Test/Compiling/RookCompilerTests.cs
  8. +0 −1 src/Rook.Test/Compiling/ScopeTests.cs
  9. +0 −1 src/Rook.Test/Compiling/Syntax/BlockTests.cs
  10. +0 −1 src/Rook.Test/Compiling/Syntax/BooleanLiteralTests.cs
  11. +0 −1 src/Rook.Test/Compiling/Syntax/CallTests.cs
  12. +0 −1 src/Rook.Test/Compiling/Syntax/ClassTests.cs
  13. +0 −1 src/Rook.Test/Compiling/Syntax/CompilationUnitTests.cs
  14. +0 −1 src/Rook.Test/Compiling/Syntax/FunctionTests.cs
  15. +0 −1 src/Rook.Test/Compiling/Syntax/IfTests.cs
  16. +0 −1 src/Rook.Test/Compiling/Syntax/IntegerLiteralTests.cs
  17. +0 −1 src/Rook.Test/Compiling/Syntax/LambdaTests.cs
  18. +0 −1 src/Rook.Test/Compiling/Syntax/MethodInvocationTests.cs
  19. +0 −1 src/Rook.Test/Compiling/Syntax/NameTests.cs
  20. +0 −1 src/Rook.Test/Compiling/Syntax/NewTests.cs
  21. +0 −1 src/Rook.Test/Compiling/Syntax/NullTests.cs
  22. +0 −1 src/Rook.Test/Compiling/Syntax/OperatorPrecedenceTests.cs
  23. +0 −1 src/Rook.Test/Compiling/Syntax/ParentheticalTests.cs
  24. +0 −1 src/Rook.Test/Compiling/Syntax/RookLexerTests.cs
  25. +0 −1 src/Rook.Test/Compiling/Syntax/StringLiteralTests.cs
  26. +0 −1 src/Rook.Test/Compiling/Syntax/TokenParserTests.cs
  27. +0 −1 src/Rook.Test/Compiling/Syntax/TypeNameParserTests.cs
  28. +0 −1 src/Rook.Test/Compiling/Syntax/TypeNameTests.cs
  29. +0 −1 src/Rook.Test/Compiling/Syntax/VectorLiteralTests.cs
  30. +0 −1 src/Rook.Test/Compiling/TypeRegistryTests.cs
  31. +0 −1 src/Rook.Test/Compiling/Types/DataTypeTests.cs
  32. +0 −1 src/Rook.Test/Compiling/Types/NamedTypeTests.cs
  33. +0 −1 src/Rook.Test/Compiling/Types/TypeUnifierTests.cs
  34. +0 −1 src/Rook.Test/Compiling/Types/TypeVariableTests.cs
  35. +0 −1 src/Rook.Test/Compiling/Types/UnknownTypeTests.cs
  36. +0 −1 src/Rook.Test/Core/Collections/ArrayVectorTests.cs
  37. +0 −1 src/Rook.Test/Core/Collections/SliceVectorTests.cs
  38. +0 −1 src/Rook.Test/Core/NullableTests.cs
  39. +0 −1 src/Rook.Test/Core/ValueTests.cs
  40. +0 −12 src/Rook.Test/FactsAttribute.cs
  41. +0 −22 src/Rook.Test/FactsTestClassCommand.cs
  42. +0 −1 src/Rook.Test/Integration/IntegrationTests.cs
  43. +4 −7 src/Rook.Test/Rook.Test.csproj
  44. +0 −59 src/Rook.Test/TestDiscoveryCommand.cs
  45. +1 −1 src/Rook.Test/packages.config
View
4 default.ps1
@@ -15,8 +15,8 @@ properties {
task default -depends Test
task Test -depends Compile {
- $xunitRunner = join-path $src "packages\xunit.runners.1.9.1\tools\xunit.console.clr4.exe"
- exec { & $xunitRunner $src\$project.Test\bin\$configuration\$project.Test.dll }
+ $fixieRunner = join-path $src "packages\Fixie.0.0.1.28\lib\net45\Fixie.Console.exe"
+ exec { & $fixieRunner $src\$project.Test\bin\$configuration\$project.Test.dll }
}
task Compile -depends CommonAssemblyInfo {
View
1 src/.nuget/packages.config
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="psake" version="4.2.0.1" />
- <package id="xunit.runners" version="1.9.1" />
</packages>
View
1 src/Rook.Test/Compiling/CSharpCompilerTests.cs
@@ -5,7 +5,6 @@
namespace Rook.Compiling
{
- [Facts]
public class CSharpCompilerTests : CompilerTests<CSharpCompiler>
{
protected override CSharpCompiler Compiler
View
1 src/Rook.Test/Compiling/CodeGeneration/CSharpTranslatorTests.cs
@@ -5,7 +5,6 @@
namespace Rook.Compiling.CodeGeneration
{
- [Facts]
public class CSharpTranslatorTests
{
private readonly RookGrammar rookGrammar;
View
1 src/Rook.Test/Compiling/CodeGeneration/CodeWriterTests.cs
@@ -3,7 +3,6 @@
namespace Rook.Compiling.CodeGeneration
{
- [Facts]
public class CodeWriterTests
{
private readonly CodeWriter code;
View
1 src/Rook.Test/Compiling/CompilerResultTests.cs
@@ -4,7 +4,6 @@
namespace Rook.Compiling
{
- [Facts]
public class CompilerResultTests
{
public void ShouldDescribeSuccessfulCompilation()
View
1 src/Rook.Test/Compiling/RookCompilerTests.cs
@@ -2,7 +2,6 @@
namespace Rook.Compiling
{
- [Facts]
public class RookCompilerTests : CompilerTests<RookCompiler>
{
protected override RookCompiler Compiler
View
1 src/Rook.Test/Compiling/ScopeTests.cs
@@ -5,7 +5,6 @@
namespace Rook.Compiling
{
- [Facts]
public class ScopeTests
{
private static readonly NamedType Integer = NamedType.Integer;
View
1 src/Rook.Test/Compiling/Syntax/BlockTests.cs
@@ -4,7 +4,6 @@
namespace Rook.Compiling.Syntax
{
- [Facts]
public class BlockTests : ExpressionTests
{
public void ContainsOneOrMoreInnerExpressions()
View
1 src/Rook.Test/Compiling/Syntax/BooleanLiteralTests.cs
@@ -2,7 +2,6 @@
namespace Rook.Compiling.Syntax
{
- [Facts]
public class BooleanLiteralTests : ExpressionTests
{
public void IsIdentifiedByKeywords()
View
1 src/Rook.Test/Compiling/Syntax/CallTests.cs
@@ -4,7 +4,6 @@
namespace Rook.Compiling.Syntax
{
- [Facts]
public class CallTests : ExpressionTests
{
public void FunctionCalls()
View
1 src/Rook.Test/Compiling/Syntax/ClassTests.cs
@@ -5,7 +5,6 @@
namespace Rook.Compiling.Syntax
{
- [Facts]
public class ClassTests : SyntaxTreeTests<Class>
{
protected override Parser<Class> Parser { get { return RookGrammar.Class; } }
View
1 src/Rook.Test/Compiling/Syntax/CompilationUnitTests.cs
@@ -6,7 +6,6 @@
namespace Rook.Compiling.Syntax
{
- [Facts]
public class CompilationUnitTests : SyntaxTreeTests<CompilationUnit>
{
protected override Parser<CompilationUnit> Parser { get { return RookGrammar.CompilationUnit; } }
View
1 src/Rook.Test/Compiling/Syntax/FunctionTests.cs
@@ -5,7 +5,6 @@
namespace Rook.Compiling.Syntax
{
- [Facts]
public class FunctionTests : SyntaxTreeTests<Function>
{
protected override Parser<Function> Parser { get { return RookGrammar.Function; } }
View
1 src/Rook.Test/Compiling/Syntax/IfTests.cs
@@ -3,7 +3,6 @@
namespace Rook.Compiling.Syntax
{
- [Facts]
public class IfTests : ExpressionTests
{
public void ContainsConditionExpressionAndTwoBodyExpressions()
View
1 src/Rook.Test/Compiling/Syntax/IntegerLiteralTests.cs
@@ -2,7 +2,6 @@
namespace Rook.Compiling.Syntax
{
- [Facts]
public class IntegerLiteralTests : ExpressionTests
{
public void IsZeroOrPositiveSequenceOfDigits()
View
1 src/Rook.Test/Compiling/Syntax/LambdaTests.cs
@@ -4,7 +4,6 @@
namespace Rook.Compiling.Syntax
{
- [Facts]
public class LambdaTests : ExpressionTests
{
public void HasABodyExpression()
View
1 src/Rook.Test/Compiling/Syntax/MethodInvocationTests.cs
@@ -7,7 +7,6 @@
namespace Rook.Compiling.Syntax
{
- [Facts]
public class MethodInvocationTests : ExpressionTests
{
private readonly Class mathClass;
View
1 src/Rook.Test/Compiling/Syntax/NameTests.cs
@@ -3,7 +3,6 @@
namespace Rook.Compiling.Syntax
{
- [Facts]
public class NameTests : ExpressionTests
{
public void CanBeIdentifier()
View
1 src/Rook.Test/Compiling/Syntax/NewTests.cs
@@ -4,7 +4,6 @@
namespace Rook.Compiling.Syntax
{
- [Facts]
public class NewTests : ExpressionTests
{
public void InvokesConstructorByTypeName()
View
1 src/Rook.Test/Compiling/Syntax/NullTests.cs
@@ -3,7 +3,6 @@
namespace Rook.Compiling.Syntax
{
- [Facts]
public class NullTests : ExpressionTests
{
public void IsIdentifiedByKeyword()
View
1 src/Rook.Test/Compiling/Syntax/OperatorPrecedenceTests.cs
@@ -1,6 +1,5 @@
namespace Rook.Compiling.Syntax
{
- [Facts]
public class OperatorPrecedenceTests : ExpressionTests
{
public void RanksFunctionCallsBeforeUnaryOperators()
View
1 src/Rook.Test/Compiling/Syntax/ParentheticalTests.cs
@@ -3,7 +3,6 @@
namespace Rook.Compiling.Syntax
{
- [Facts]
public class ParentheticalTests : ExpressionTests
{
public void ParentheticalExpressions()
View
1 src/Rook.Test/Compiling/Syntax/RookLexerTests.cs
@@ -4,7 +4,6 @@
namespace Rook.Compiling.Syntax
{
- [Facts]
public class RookLexerTests
{
private static IEnumerable<Token> Tokenize(string input)
View
1 src/Rook.Test/Compiling/Syntax/StringLiteralTests.cs
@@ -4,7 +4,6 @@
namespace Rook.Compiling.Syntax
{
- [Facts]
public class StringLiteralTests : ExpressionTests
{
public void IsIdentifiedByQuotedContentCharacters()
View
1 src/Rook.Test/Compiling/Syntax/TokenParserTests.cs
@@ -4,7 +4,6 @@
namespace Rook.Compiling.Syntax
{
- [Facts]
public class TokenParserTests
{
private static Action<Token> Token(TokenKind expectedKind, string expectedLiteral)
View
1 src/Rook.Test/Compiling/Syntax/TypeNameParserTests.cs
@@ -2,7 +2,6 @@
namespace Rook.Compiling.Syntax
{
- [Facts]
public class TypeNameParserTests
{
private static readonly TypeName Foo = new TypeName("Foo");
View
1 src/Rook.Test/Compiling/Syntax/TypeNameTests.cs
@@ -2,7 +2,6 @@
namespace Rook.Compiling.Syntax
{
- [Facts]
public class TypeNameTests
{
public void HasAName()
View
1 src/Rook.Test/Compiling/Syntax/VectorLiteralTests.cs
@@ -4,7 +4,6 @@
namespace Rook.Compiling.Syntax
{
- [Facts]
public class VectorLiteralTests : ExpressionTests
{
public void ContainsOneOrMoreExpressions()
View
1 src/Rook.Test/Compiling/TypeRegistryTests.cs
@@ -4,7 +4,6 @@
namespace Rook.Compiling
{
- [Facts]
public class TypeRegistryTests
{
private readonly TypeRegistry typeRegistry;
View
1 src/Rook.Test/Compiling/Types/DataTypeTests.cs
@@ -2,7 +2,6 @@
namespace Rook.Compiling.Types
{
- [Facts]
public class DataTypeTests
{
public void CanFreshenGenericTypeVariables()
View
1 src/Rook.Test/Compiling/Types/NamedTypeTests.cs
@@ -6,7 +6,6 @@
namespace Rook.Compiling.Types
{
- [Facts]
public class NamedTypeTests
{
public void HasAName()
View
1 src/Rook.Test/Compiling/Types/TypeUnifierTests.cs
@@ -3,7 +3,6 @@
namespace Rook.Compiling.Types
{
- [Facts]
public class TypeUnifierTests
{
private static readonly NamedType Integer = NamedType.Integer;
View
1 src/Rook.Test/Compiling/Types/TypeVariableTests.cs
@@ -3,7 +3,6 @@
namespace Rook.Compiling.Types
{
- [Facts]
public class TypeVariableTests
{
private readonly TypeVariable a;
View
1 src/Rook.Test/Compiling/Types/UnknownTypeTests.cs
@@ -3,7 +3,6 @@
namespace Rook.Compiling.Types
{
- [Facts]
public class UnknownTypeTests
{
private static readonly UnknownType Unknown = UnknownType.Instance;
View
1 src/Rook.Test/Core/Collections/ArrayVectorTests.cs
@@ -3,7 +3,6 @@
namespace Rook.Core.Collections
{
- [Facts]
public class ArrayVectorTests
{
public void ShouldProvideItemCount()
View
1 src/Rook.Test/Core/Collections/SliceVectorTests.cs
@@ -3,7 +3,6 @@
namespace Rook.Core.Collections
{
- [Facts]
public class SliceVectorTests
{
public void ShouldProvideItemCount()
View
1 src/Rook.Test/Core/NullableTests.cs
@@ -3,7 +3,6 @@
namespace Rook.Core
{
- [Facts]
public class NullableTests
{
public void CanWrapValueTypes()
View
1 src/Rook.Test/Core/ValueTests.cs
@@ -2,7 +2,6 @@
namespace Rook.Core
{
- [Facts]
public class ValueTests
{
public void AnInstanceShouldAlwaysReturnTheSameHashCode()
View
12 src/Rook.Test/FactsAttribute.cs
@@ -1,12 +0,0 @@
-using System;
-using Xunit;
-
-namespace Rook
-{
- [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
- public class FactsAttribute : RunWithAttribute
- {
- public FactsAttribute()
- :base(typeof(FactsTestClassCommand)) { }
- }
-}
View
22 src/Rook.Test/FactsTestClassCommand.cs
@@ -1,22 +0,0 @@
-using System.Collections.Generic;
-using Xunit.Sdk;
-
-namespace Rook
-{
- public class FactsTestClassCommand : TestDiscoveryCommand
- {
- public override bool IsTestMethod(IMethodInfo testMethod)
- {
- return !testMethod.IsAbstract &&
- !testMethod.IsStatic &&
- testMethod.MethodInfo.IsPublic &&
- testMethod.MethodInfo.ReturnType == typeof(void) &&
- testMethod.MethodInfo.GetParameters().Length == 0;
- }
-
- public override IEnumerable<ITestCommand> EnumerateTestCommands(IMethodInfo testMethod)
- {
- yield return new FactCommand(testMethod);
- }
- }
-}
View
1 src/Rook.Test/Integration/IntegrationTests.cs
@@ -8,7 +8,6 @@
namespace Rook.Integration
{
- [Facts]
public class IntegrationTests
{
public void ArithmeticExpression() { Run("ArithmeticExpression"); }
View
11 src/Rook.Test/Rook.Test.csproj
@@ -57,6 +57,10 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
+ <Reference Include="Fixie, Version=0.0.1.28, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\packages\Fixie.0.0.1.28\lib\net45\Fixie.dll</HintPath>
+ </Reference>
<Reference Include="Parsley, Version=0.0.5.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Parsley.0.0.5.0\lib\net45\Parsley.dll</HintPath>
@@ -68,10 +72,6 @@
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
- <Reference Include="xunit, Version=1.9.1.1600, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\xunit.1.9.1\lib\net20\xunit.dll</HintPath>
- </Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="..\CommonAssemblyInfo.cs">
@@ -104,8 +104,6 @@
<Compile Include="Core\Collections\SliceVectorTests.cs" />
<Compile Include="Core\NullableTests.cs" />
<Compile Include="Core\ValueTests.cs" />
- <Compile Include="FactsAttribute.cs" />
- <Compile Include="FactsTestClassCommand.cs" />
<Compile Include="ScopeExtensions.cs" />
<Compile Include="Serializer.cs" />
<Compile Include="Compiling\ScopeTests.cs" />
@@ -128,7 +126,6 @@
<Compile Include="Compiling\Types\NamedTypeTests.cs" />
<Compile Include="Compiling\Types\TypeUnifierTests.cs" />
<Compile Include="Compiling\Types\TypeVariableTests.cs" />
- <Compile Include="TestDiscoveryCommand.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Rook.Compiling\Rook.Compiling.csproj">
View
59 src/Rook.Test/TestDiscoveryCommand.cs
@@ -1,59 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using Xunit;
-using Xunit.Sdk;
-
-namespace Rook
-{
- public abstract class TestDiscoveryCommand : ITestClassCommand
- {
- private readonly TestClassCommand defaultBehavior = new TestClassCommand();
-
- public abstract bool IsTestMethod(IMethodInfo testMethod);
-
- public abstract IEnumerable<ITestCommand> EnumerateTestCommands(IMethodInfo testMethod);
-
- public IEnumerable<IMethodInfo> EnumerateTestMethods()
- {
- return TypeUnderTest.GetMethods().Where(IsTestMethod);
- }
-
- public object ObjectUnderTest
- {
- get { return defaultBehavior.ObjectUnderTest; }
- }
-
- public ITypeInfo TypeUnderTest
- {
- get { return defaultBehavior.TypeUnderTest; }
- set { defaultBehavior.TypeUnderTest = value; }
- }
-
- public int ChooseNextTest(ICollection<IMethodInfo> testsLeftToRun)
- {
- return defaultBehavior.ChooseNextTest(testsLeftToRun);
- }
-
- public Exception ClassStart()
- {
- try
- {
- foreach (var @interface in TypeUnderTest.Type.GetInterfaces())
- if (@interface.IsGenericType && @interface.GetGenericTypeDefinition() == typeof(IUseFixture<>))
- throw new NotSupportedException(GetType() + "does not support IUseFixture<>.");
-
- return null;
- }
- catch (Exception ex)
- {
- return ex;
- }
- }
-
- public Exception ClassFinish()
- {
- return null;
- }
- }
-}
View
2 src/Rook.Test/packages.config
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
+ <package id="Fixie" version="0.0.1.28" targetFramework="net45" />
<package id="Parsley" version="0.0.5.0" targetFramework="net45" />
<package id="Should" version="1.1.12.0" />
- <package id="xunit" version="1.9.1" targetFramework="net40" />
</packages>

0 comments on commit 17b974d

Please sign in to comment.