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
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
TestWithNoParameters | |
TestWithInterestingParameters | |
Person: Arthur Vandelay, born on 1/1/1980 12:00:00 AM. | |
TestWithInterestingParameters | |
Person: Kel Varnsen, born on 1/1/1978 12:00:00 AM. | |
TestWithInterestingParameters | |
Person: Martin Van Nostrand, born on 1/1/1995 12:00:00 AM. |
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 TestWithInterestingParameter(Person person) | |
{ |
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
TestWithNoParameters | |
TestWithInterestingParameters | |
Person: Arthur Vandelay, born on 1/1/1980 12:00:00 AM. | |
TestWithInterestingParameters | |
Person: Kel Varnsen, born on 1/1/1978 12:00:00 AM. | |
TestWithInterestingParameters | |
Person: Martin Van Nostrand, born on 1/1/1995 12:00:00 AM. |
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
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Reflection; | |
using Fixie; | |
using Fixie.Conventions; | |
public class CustomConvention : Convention | |
{ |
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
TestWithNoParameters | |
Test 'ParameterizedTests.TestWithInterestingParameter' 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) | |
1 passed, 1 failed, 0 skipped, took 0.19 seconds (Fixie 0.0.1.98). |
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 TestWithInterestingParameter(Person person) | |
{ |
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 | |
TestWithTrivialParameters | |
i: 60 | |
b: True | |
TestWithInterestingParameters | |
Person A: Named5bf97cd-456e-488e-b75c-67c03b10c8f2, born on 8/22/2013 10:09:20 PM. |
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
using System; | |
using System.Linq; | |
using Fixie; | |
using Fixie.Conventions; | |
public class CustomConvention : Convention | |
{ | |
readonly Ploeh.AutoFixture.Fixture autoFixture = new Ploeh.AutoFixture.Fixture(); | |
public CustomConvention() |
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 static class AutoFixtureExtensions | |
{ | |
//Normal AutoFixture usage is to write: | |
// | |
// var thing = autoFixture.Create<MyClass>(); | |
// | |
//If all you have is an arbitrary Type object, though, | |
//this extension method lets you write: | |
// | |
// var thing = autoFixture.Create(type); |