public override void OneTimeSetup() { _constructorMethodInstanceType = typeof(ConstructorMethod); _constructorMethodInstanceFixture = this.Create <ConstructorMethod>(true); _constructorMethodInstance = _constructorMethodInstanceFixture ?? this.Create <ConstructorMethod>(false); CurrentInstance = _constructorMethodInstanceFixture; ConfigureIgnoringTests(); // Configure ignoring tests. }
public void AUT_ConstructorMethod_Constructor_Instantiation_With_Parameter_Test() { // Arrange var constructor = this.CreateType <ConstructorInfo>(); ConstructorMethod instance = null; Exception creationException = null; // Act Action createAction = () => instance = new ConstructorMethod(constructor); creationException = ActionAnalyzer.GetActionException(createAction); // Assert instance.ShouldNotBeNull(); _constructorMethodInstance.ShouldNotBeNull(); _constructorMethodInstanceFixture.ShouldNotBeNull(); Should.NotThrow(createAction); }