public void CustomizeWithNullFixtureThrows() { // Arrange var sut = new RandomRangedNumberCustomization(); // Act & assert Assert.Throws <ArgumentNullException>(() => sut.Customize(null)); }
public void SutIsCustomization() { // Arrange // Act var sut = new RandomRangedNumberCustomization(); // Assert Assert.IsAssignableFrom <ICustomization>(sut); }
public void CustomizeWithNullFixtureThrows() { // Fixture setup var sut = new RandomRangedNumberCustomization(); // Exercise system and verify outcome Assert.Throws <ArgumentNullException>(() => sut.Customize(null)); // Teardown }
public void SutIsCustomization() { // Fixture setup // Exercise system var sut = new RandomRangedNumberCustomization(); // Verify outcome Assert.IsAssignableFrom <ICustomization>(sut); // Teardown }
public void CustomizeAddsCorrectBuilderToFixture() { // Arrange var fixture = new Fixture(); var sut = new RandomRangedNumberCustomization(); // Act sut.Customize(fixture); var result = fixture.Customizations .OfType <RandomRangedNumberGenerator>() .SingleOrDefault(); // Assert Assert.NotNull(result); }
public void CustomizeAddsCorrectBuilderToFixture() { // Fixture setup var fixture = new Fixture(); var sut = new RandomRangedNumberCustomization(); // Exercise system sut.Customize(fixture); var result = fixture.Customizations .OfType <RandomRangedNumberGenerator>() .SingleOrDefault(); // Verify outcome Assert.NotNull(result); // Teardown }