public void CustomizeWithNullThrowsArgumentNullException() { // Arrange var sut = new IncrementingDateTimeCustomization(); // Act & assert Assert.Throws <ArgumentNullException>(() => sut.Customize(null)); }
public void CustomizeWithNullThrowsArgumentNullException() { // Fixture setup var sut = new IncrementingDateTimeCustomization(); // Exercise system and verify outcome Assert.Throws <ArgumentNullException>(() => sut.Customize(null)); // Teardown }
public void CustomizeAddsIncrementingDateTimeGeneratorToTheFixture() { // Arrange var fixture = new Fixture(); var sut = new IncrementingDateTimeCustomization(); // Act sut.Customize(fixture); // Assert var containsIncrementingDateTimeGenerator = fixture .Customizations .OfType <StrictlyMonotonicallyIncreasingDateTimeGenerator>() .Any(); Assert.True(containsIncrementingDateTimeGenerator); }
public void CustomizeAddsIncrementingDateTimeGeneratorToTheFixture() { // Fixture setup var fixture = new Fixture(); var sut = new IncrementingDateTimeCustomization(); // Exercise system sut.Customize(fixture); // Verify outcome var containsIncrementingDateTimeGenerator = fixture .Customizations .OfType <StrictlyMonotonicallyIncreasingDateTimeGenerator>() .Any(); Assert.True(containsIncrementingDateTimeGenerator); // Teardown }