Пример #1
0
 public override void OneTimeSetup()
 {
     _nullComposerInstanceType    = typeof(NullComposer <dynamic>);
     _nullComposerInstanceFixture = this.Create <NullComposer <dynamic> >(true);
     _nullComposerInstance        = _nullComposerInstanceFixture ?? this.Create <NullComposer <dynamic> >(false);
     CurrentInstance = _nullComposerInstanceFixture;
     ConfigureIgnoringTests(); // Configure ignoring tests.
 }
Пример #2
0
        public void AUT_NullComposer_Instantiated_Without_Parameter_No_Throw_Exception_Test()
        {
            // Arrange
            NullComposer <dynamic> instance = null;

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

            // Assert
            instance.ShouldNotBeNull();
            exception.ShouldBeNull();
        }
Пример #3
0
        public void AUT_NullComposer_Constructor_Instantiation_With_Parameter_Test()
        {
            // Arrange
            var builder = this.CreateType <ISpecimenBuilder>();
            NullComposer <dynamic> instance = null;
            Exception creationException     = null;

            // Act
            Action createAction = () => instance = new NullComposer <dynamic>(builder);

            creationException = ActionAnalyzer.GetActionException(createAction);

            // Assert
            instance.ShouldNotBeNull();
            _nullComposerInstance.ShouldNotBeNull();
            _nullComposerInstanceFixture.ShouldNotBeNull();
            Should.NotThrow(createAction);
        }