コード例 #1
0
 public override void OneTimeSetup()
 {
     _constructorCustomizationInstanceType    = typeof(ConstructorCustomization);
     _constructorCustomizationInstanceFixture = this.Create <ConstructorCustomization>(true);
     _constructorCustomizationInstance        = _constructorCustomizationInstanceFixture ?? this.Create <ConstructorCustomization>(false);
     CurrentInstance = _constructorCustomizationInstanceFixture;
     ConfigureIgnoringTests(); // Configure ignoring tests.
 }
コード例 #2
0
        public void AUT_ConstructorCustomization_Constructor_Instantiation_With_Parameter_Test()
        {
            // Arrange
            var targetType = this.CreateType <Type>();
            var query      = this.CreateType <IMethodQuery>();
            ConstructorCustomization instance = null;
            Exception creationException       = null;

            // Act
            Action createAction = () => instance = new ConstructorCustomization(targetType, query);

            creationException = ActionAnalyzer.GetActionException(createAction);

            // Assert
            instance.ShouldNotBeNull();
            _constructorCustomizationInstance.ShouldNotBeNull();
            _constructorCustomizationInstanceFixture.ShouldNotBeNull();
            Should.NotThrow(createAction);
        }