Esempio n. 1
0
 public override void OneTimeSetup()
 {
     _omitOnRecursionBehaviorInstanceType    = typeof(OmitOnRecursionBehavior);
     _omitOnRecursionBehaviorInstanceFixture = this.Create <OmitOnRecursionBehavior>(true);
     _omitOnRecursionBehaviorInstance        = _omitOnRecursionBehaviorInstanceFixture ?? this.Create <OmitOnRecursionBehavior>(false);
     CurrentInstance = _omitOnRecursionBehaviorInstanceFixture;
     ConfigureIgnoringTests(); // Configure ignoring tests.
 }
Esempio n. 2
0
        public void AUT_OmitOnRecursionBehavior_Instantiated_Without_Parameter_No_Throw_Exception_Test()
        {
            // Arrange
            OmitOnRecursionBehavior instance = null;

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

            // Assert
            instance.ShouldNotBeNull();
            exception.ShouldBeNull();
        }
Esempio n. 3
0
        public void AUT_OmitOnRecursionBehavior_Constructor_Instantiation_With_Parameter_Test()
        {
            // Arrange
            var recursionDepth = this.CreateType <int>();
            OmitOnRecursionBehavior instance = null;
            Exception creationException      = null;

            // Act
            Action createAction = () => instance = new OmitOnRecursionBehavior(recursionDepth);

            creationException = ActionAnalyzer.GetActionException(createAction);

            // Assert
            instance.ShouldNotBeNull();
            _omitOnRecursionBehaviorInstance.ShouldNotBeNull();
            _omitOnRecursionBehaviorInstanceFixture.ShouldNotBeNull();
            Should.NotThrow(createAction);
        }