Created
October 15, 2013 16:27
-
-
Save plioi/6994379 to your computer and use it in GitHub Desktop.
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) | |
{ | |
Console.WriteLine("TestWithInterestingParameter"); | |
Console.WriteLine(" Person: " + person); | |
Console.WriteLine(); | |
} | |
//Something fishy about this new test! | |
public void TestWithDateTimeParameterNeverGetsCalled(DateTime dateTime) | |
{ | |
Console.WriteLine("This test method is never called, and has no effect on the test run's output!"); | |
} | |
public static IEnumerable<Person> People() | |
{ | |
yield return new Person { Name = "Arthur Vandelay", BirthDay = new DateTime(1980, 1, 1) }; | |
yield return new Person { Name = "Kel Varnsen", BirthDay = new DateTime(1978, 1, 1) }; | |
} | |
public static IEnumerable<Person> MorePeople() | |
{ | |
yield return new Person { Name = "Martin Van Nostrand", BirthDay = new DateTime(1995, 1, 1) }; | |
yield return new Person { Name = "H.E. Pennypacker", BirthDay = new DateTime(1920, 1, 1) }; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment