コード例 #1
0
 public override void OneTimeSetup()
 {
     _missingParametersSupplyingMethodFactoryInstanceType    = typeof(MissingParametersSupplyingMethodFactory);
     _missingParametersSupplyingMethodFactoryInstanceFixture = this.Create <MissingParametersSupplyingMethodFactory>(true);
     _missingParametersSupplyingMethodFactoryInstance        = _missingParametersSupplyingMethodFactoryInstanceFixture ?? this.Create <MissingParametersSupplyingMethodFactory>(false);
     CurrentInstance = _missingParametersSupplyingMethodFactoryInstanceFixture;
     ConfigureIgnoringTests(); // Configure ignoring tests.
 }
コード例 #2
0
        public void AUT_MissingParametersSupplyingMethodFactory_Constructor_Instantiation_With_Parameter_Test()
        {
            // Arrange
            var owner = this.CreateType <object>();
            MissingParametersSupplyingMethodFactory instance = null;
            Exception creationException = null;

            // Act
            Action createAction = () => instance = new MissingParametersSupplyingMethodFactory(owner);

            creationException = ActionAnalyzer.GetActionException(createAction);

            // Assert
            instance.ShouldNotBeNull();
            _missingParametersSupplyingMethodFactoryInstance.ShouldNotBeNull();
            _missingParametersSupplyingMethodFactoryInstanceFixture.ShouldNotBeNull();
            Should.NotThrow(createAction);
        }