public void CreateOnSpecimenBuilderReturnsCorrectResult() { // Arrange var expected = new DateTime(2012, 11, 20, 9, 45, 51); var builder = new DelegatingSpecimenBuilder(); builder.OnCreate = (r, c) => { Assert.NotNull(c); Assert.Equal( new SeededRequest(typeof(DateTime), default(DateTime)), r); return(expected); }; // Act DateTime actual = builder.Create <DateTime>(); // Assert Assert.Equal(expected, actual); }
public void CreateOnSpecimenBuilderReturnsCorrectResult() { // Fixture setup var expected = new DateTime(2012, 11, 20, 9, 45, 51); var builder = new DelegatingSpecimenBuilder(); builder.OnCreate = (r, c) => { Assert.NotNull(c); Assert.Equal( new SeededRequest(typeof(DateTime), default(DateTime)), r); return(expected); }; // Exercise system DateTime actual = builder.Create <DateTime>(); // Verify outcome Assert.Equal(expected, actual); // Teardown }
public void CreateWithSeedOnSpecimenBuilderReturnsCorrectResult() { // Fixture setup var seed = new Version(2, 15); var expected = new Version(3, 0); var builder = new DelegatingSpecimenBuilder(); builder.OnCreate = (r, c) => { Assert.NotNull(c); Assert.Equal( new SeededRequest(typeof(Version), seed), r); return expected; }; // Exercise system Version actual = builder.Create<Version>(seed); // Verify outcome Assert.Equal(expected, actual); // Teardown }
public void CreateOnSpecimenBuilderReturnsCorrectResult() { // Fixture setup var expected = new DateTime(2012, 11, 20, 9, 45, 51); var builder = new DelegatingSpecimenBuilder(); builder.OnCreate = (r, c) => { Assert.NotNull(c); Assert.Equal( new SeededRequest(typeof(DateTime), default(DateTime)), r); return expected; }; // Exercise system DateTime actual = builder.Create<DateTime>(); // Verify outcome Assert.Equal(expected, actual); // Teardown }