This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
------ Test started: Assembly: AutoFixtureDemo.dll ------ | |
TestWithNoParameters | |
Test 'ParameterizedTests.TestWithTrivialParameters' failed: System.Reflection.TargetParameterCountException | |
Parameter count mismatch. | |
at System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) | |
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) | |
at Fixie.Case.Execute(Object instance) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ParameterizedTests | |
{ | |
public void TestWithNoParameters() | |
{ | |
Console.WriteLine("TestWithNoParameters"); | |
Console.WriteLine(); | |
} | |
public void TestWithTrivialParameters(int i, bool b) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Person | |
{ | |
public string Name { get; set; } | |
public DateTime BirthDay { get; set; } | |
public override string ToString() | |
{ | |
return String.Format("{0}, born on {1}.", Name, BirthDay); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public MethodFilter Cases { get; private set; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ShouldaConvention : Convention | |
{ | |
public ShouldaConvention() | |
{ | |
Classes | |
.Where(type => type.Name.StartsWith("When_"); | |
Cases | |
.Where(method => method.Name.StartsWith("Should_")) | |
.Where(method => method.IsVoid()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Case[] cases = Methods | |
.Filter(testClass) | |
.Select(x => new Case(testClass, x)) | |
.ToArray(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CustomConvention : Convention | |
{ | |
public CustomConvention() | |
{ | |
Classes | |
.NameEndsWith("Tests"); | |
Methods | |
.Where(method => method.IsVoid()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] | |
public class InputAttribute : Attribute | |
{ | |
public InputAttribute(params object[] parameters) | |
{ | |
Parameters = parameters; | |
} | |
public object[] Parameters { get; private set; } | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CalculatorTests | |
{ | |
readonly Calculator calculator; | |
public CalculatorTests() | |
{ | |
calculator = new Calculator(); | |
} | |
[Input(2, 3, 5)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CustomConvention : Convention | |
{ | |
public CustomConvention() | |
{ | |
Classes | |
.NameEndsWith("Tests"); | |
Cases | |
.Where(method => method.IsVoid()); |