public void TransformNullBuilderThrows() { // Arrange var sut = new NullRecursionBehavior(); // Act & assert Assert.Throws <ArgumentNullException>(() => sut.Transform(null)); }
public void SutIsSpecimenBuilderTransformation() { // Arrange // Act var sut = new NullRecursionBehavior(); // Assert Assert.IsAssignableFrom <ISpecimenBuilderTransformation>(sut); }
public void TransformNullBuilderThrows() { // Fixture setup var sut = new NullRecursionBehavior(); // Exercise system and verify outcome Assert.Throws <ArgumentNullException>(() => sut.Transform(null)); // Teardown }
public void SutIsSpecimenBuilderTransformation() { // Fixture setup // Exercise system var sut = new NullRecursionBehavior(); // Verify outcome Assert.IsAssignableFrom <ISpecimenBuilderTransformation>(sut); // Teardown }
public void TransformReturnsCorrectResult() { // Fixture setup var sut = new NullRecursionBehavior(); // Exercise system var dummyBuilder = new DelegatingSpecimenBuilder(); var result = sut.Transform(dummyBuilder); // Verify outcome Assert.IsAssignableFrom <NullRecursionGuard>(result); // Teardown }
public void TransformResultCorrectlyDecoratesInput() { // Arrange var sut = new NullRecursionBehavior(); var expectedBuilder = new DelegatingSpecimenBuilder(); // Act var result = sut.Transform(expectedBuilder); // Assert var guard = Assert.IsAssignableFrom <RecursionGuard>(result); Assert.Equal(expectedBuilder, guard.Builder); }
public void TranformResultCorrectlyDecoratesInput() { // Fixture setup var sut = new NullRecursionBehavior(); var expectedBuilder = new DelegatingSpecimenBuilder(); // Exercise system var result = sut.Transform(expectedBuilder); // Verify outcome var guard = Assert.IsAssignableFrom <NullRecursionGuard>(result); Assert.Equal(expectedBuilder, guard.Builder); // Teardown }
public void TransformReturnsCorrectResultForDefaultRecursionDepth() { // Arrange var sut = new NullRecursionBehavior(); // Act var dummyBuilder = new DelegatingSpecimenBuilder(); var result = sut.Transform(dummyBuilder); // Assert var rg = Assert.IsAssignableFrom <RecursionGuard>(result); Assert.IsAssignableFrom <NullRecursionHandler>(rg.RecursionHandler); Assert.Equal(1, rg.RecursionDepth); }
public void TransformReturnsCorrectResultForDefaultRecursionDepth() { // Fixture setup var sut = new NullRecursionBehavior(); // Exercise system var dummyBuilder = new DelegatingSpecimenBuilder(); var result = sut.Transform(dummyBuilder); // Verify outcome var rg = Assert.IsAssignableFrom <RecursionGuard>(result); Assert.IsAssignableFrom <NullRecursionHandler>(rg.RecursionHandler); Assert.Equal(1, rg.RecursionDepth); // Teardown }