public void ConstructWithNullPredicateThrows() { // Arrange var dummyGraph = new CompositeSpecimenBuilder(); var dummyTransformations = new ISpecimenBuilderTransformation[0]; // Act & assert Assert.Throws <ArgumentNullException>(() => new SingletonSpecimenBuilderNodeStackAdapterCollection( dummyGraph, null, dummyTransformations)); }
public void ConstructWithNullGraphThrows() { // Arrange Func <ISpecimenBuilderNode, bool> dummyPredicate = n => false; var dummyTransformations = new ISpecimenBuilderTransformation[0]; // Act & assert Assert.Throws <ArgumentNullException>(() => new SingletonSpecimenBuilderNodeStackAdapterCollection( null, dummyPredicate, dummyTransformations)); }
public void ConstructWithNullPredicateThrows() { // Fixture setup var dummyGraph = new CompositeSpecimenBuilder(); var dummyTransformations = new ISpecimenBuilderTransformation[0]; // Exercise system and verify outcome Assert.Throws <ArgumentNullException>(() => new SingletonSpecimenBuilderNodeStackAdapterCollection( dummyGraph, null, dummyTransformations)); // Teardown }
public void ConstructWithNullGraphThrows() { // Fixture setup Func <ISpecimenBuilderNode, bool> dummyPredicate = n => false; var dummyTransformations = new ISpecimenBuilderTransformation[0]; // Exercise system and verify outcome Assert.Throws <ArgumentNullException>(() => new SingletonSpecimenBuilderNodeStackAdapterCollection( null, dummyPredicate, dummyTransformations)); // Teardown }
public void ConstructWithNullPredicateThrows() { // Fixture setup var dummyGraph = new CompositeSpecimenBuilder(); var dummyTransformations = new ISpecimenBuilderTransformation[0]; // Exercise system and verify outcome Assert.Throws<ArgumentNullException>(() => new SingletonSpecimenBuilderNodeStackAdapterCollection( dummyGraph, null, dummyTransformations)); // Teardown }
public void ConstructWithNullGraphThrows() { // Fixture setup Func<ISpecimenBuilderNode, bool> dummyPredicate = n => false; var dummyTransformations = new ISpecimenBuilderTransformation[0]; // Exercise system and verify outcome Assert.Throws<ArgumentNullException>(() => new SingletonSpecimenBuilderNodeStackAdapterCollection( null, dummyPredicate, dummyTransformations)); // Teardown }
/// <summary> /// Adds the specified behavior to the auto fixture instance. /// </summary> /// <param name="fixture">The fixture.</param> /// <param name="behavior">The behavior.</param> /// <returns></returns> public static ITestFixture HavingAutoFixtureBehavior(this ITestFixture fixture, ISpecimenBuilderTransformation behavior) => fixture.HavingAutoFixture(f => f.Behaviors.Add(behavior));