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