コード例 #1
0
 public override void OneTimeSetup()
 {
     _defaultEnginePartsInstanceType    = typeof(DefaultEngineParts);
     _defaultEnginePartsInstanceFixture = this.Create <DefaultEngineParts>(true);
     _defaultEnginePartsInstance        = _defaultEnginePartsInstanceFixture ?? this.Create <DefaultEngineParts>(false);
     CurrentInstance = _defaultEnginePartsInstanceFixture;
     ConfigureIgnoringTests(); // Configure ignoring tests.
 }
コード例 #2
0
        public void AUT_DefaultEngineParts_Instantiated_Without_Parameter_No_Throw_Exception_Test()
        {
            // Arrange
            DefaultEngineParts instance = null;

            // Act
            var exception = CreateAnalyzer.GetThrownExceptionWhenCreate(out instance);

            // Assert
            instance.ShouldNotBeNull();
            exception.ShouldBeNull();
        }
コード例 #3
0
        public void AUT_DefaultEngineParts_Constructor_Instantiation_With_Parameter_Test()
        {
            // Arrange
            var primitiveBuilders                = this.CreateType <IEnumerable <ISpecimenBuilder> >();
            DefaultEngineParts instance          = null;
            Exception          creationException = null;

            // Act
            Action createAction = () => instance = new DefaultEngineParts(primitiveBuilders);

            creationException = ActionAnalyzer.GetActionException(createAction);

            // Assert
            instance.ShouldNotBeNull();
            _defaultEnginePartsInstance.ShouldNotBeNull();
            _defaultEnginePartsInstanceFixture.ShouldNotBeNull();
            Should.NotThrow(createAction);
        }