Exemplo n.º 1
0
        public void AUT_GuidGenerator_Create_Static_Method_DirectCall_Result_ShouldNotBe_Null_Test()
        {
            // Arrange
            this.ValidateExecuteCondition(MethodCreate);
            var returnedValue = default(Guid);

            // Act
            Action executeAction = () => returnedValue = GuidGenerator.Create();

            ActionAnalyzer.DoesActionThrowException(executeAction);

            // Assert
            returnedValue.ShouldNotBeNull();
        }
        public void AUT_FiniteSequenceRequest_CreateRequests_Method_DirectCall_Result_ShouldNotBe_Null_Test()
        {
            // Arrange
            this.ValidateExecuteCondition(MethodCreateRequests);
            var returnedValue = default(IEnumerable <object>);

            // Act
            Action executeAction = () => returnedValue = _finiteSequenceRequestInstance.CreateRequests();

            ActionAnalyzer.DoesActionThrowException(executeAction);

            // Assert
            returnedValue.ShouldNotBeNull();
        }
        public void AUT_NoSpecimenOutputGuard_GetEnumerator_Method_DirectCall_Result_ShouldNotBe_Null_Test()
        {
            // Arrange
            this.ValidateExecuteCondition(MethodGetEnumerator);
            var returnedValue = default(IEnumerator <ISpecimenBuilder>);

            // Act
            Action executeAction = () => returnedValue = _noSpecimenOutputGuardInstance.GetEnumerator();

            ActionAnalyzer.DoesActionThrowException(executeAction);

            // Assert
            returnedValue.ShouldNotBeNull();
        }
Exemplo n.º 4
0
        public void AUT_NullComposer_Compose_Method_DirectCall_Result_ShouldNotBe_Null_Test()
        {
            // Arrange
            this.ValidateExecuteCondition(MethodCompose);
            var returnedValue = default(ISpecimenBuilder);

            // Act
            Action executeAction = () => returnedValue = _nullComposerInstance.Compose();

            ActionAnalyzer.DoesActionThrowException(executeAction);

            // Assert
            returnedValue.ShouldNotBeNull();
        }
        public void AUT_Int16SequenceGenerator_Create_Method_DirectCall_Result_ShouldNotBe_Null_Test()
        {
            // Arrange
            this.ValidateExecuteCondition(MethodCreate);
            var returnedValue = default(short);

            // Act
            Action executeAction = () => returnedValue = _int16SequenceGeneratorInstance.Create();

            ActionAnalyzer.DoesActionThrowException(executeAction);

            // Assert
            returnedValue.ShouldNotBeNull();
        }
Exemplo n.º 6
0
        public void AUT_RangedNumberRequest_ToString_Method_DirectCall_Result_ShouldBe_Null_Test()
        {
            // Arrange
            this.ValidateExecuteCondition(MethodToString);
            var returnedValue = default(string);

            // Act
            Action executeAction = () => returnedValue = _rangedNumberRequestInstance.ToString();

            ActionAnalyzer.DoesActionThrowException(executeAction);

            // Assert
            returnedValue.ShouldBeNull();
        }
        public void AUT_SpecimenContext_Resolve_Method_DirectCall_Result_ShouldBe_Null_Test()
        {
            // Arrange
            this.ValidateExecuteCondition(MethodResolve);
            var request       = this.CreateType <object>();
            var returnedValue = default(object);

            // Act
            Action executeAction = () => returnedValue = _specimenContextInstance.Resolve(request);

            ActionAnalyzer.DoesActionThrowException(executeAction);

            // Assert
            returnedValue.ShouldBeNull();
        }
Exemplo n.º 8
0
        public void AUT_CustomizationExtensions_ToCustomization_Static_Method_DirectCall_Result_ShouldNotBe_Null_Test()
        {
            // Arrange
            this.ValidateExecuteCondition(MethodToCustomization);
            var builder       = this.CreateType <ISpecimenBuilder>();
            var returnedValue = default(ICustomization);

            // Act
            Action executeAction = () => returnedValue = CustomizationExtensions.ToCustomization(builder);

            ActionAnalyzer.DoesActionThrowException(executeAction);

            // Assert
            returnedValue.ShouldNotBeNull();
        }
Exemplo n.º 9
0
        public void AUT_ThrowingRecursionBehavior_Transform_Method_DirectCall_Result_ShouldNotBe_Null_Test()
        {
            // Arrange
            this.ValidateExecuteCondition(MethodTransform);
            var builder       = this.CreateType <ISpecimenBuilder>();
            var returnedValue = default(ISpecimenBuilderNode);

            // Act
            Action executeAction = () => returnedValue = _throwingRecursionBehaviorInstance.Transform(builder);

            ActionAnalyzer.DoesActionThrowException(executeAction);

            // Assert
            returnedValue.ShouldNotBeNull();
        }
        public void AUT_ModestAttribute_GetCustomization_Method_DirectCall_Result_ShouldBe_Null_Test()
        {
            // Arrange
            this.ValidateExecuteCondition(MethodGetCustomization);
            var parameter     = this.CreateType <ParameterInfo>();
            var returnedValue = default(ICustomization);

            // Act
            Action executeAction = () => returnedValue = _modestAttributeInstance.GetCustomization(parameter);

            ActionAnalyzer.DoesActionThrowException(executeAction);

            // Assert
            returnedValue.ShouldBeNull();
        }
        public void AUT_NoSpecimenOutputGuard_Compose_Method_DirectCall_Result_ShouldNotBe_Null_Test()
        {
            // Arrange
            this.ValidateExecuteCondition(MethodCompose);
            var builders      = this.CreateType <IEnumerable <ISpecimenBuilder> >();
            var returnedValue = default(ISpecimenBuilderNode);

            // Act
            Action executeAction = () => returnedValue = _noSpecimenOutputGuardInstance.Compose(builders);

            ActionAnalyzer.DoesActionThrowException(executeAction);

            // Assert
            returnedValue.ShouldNotBeNull();
        }
        public void AUT_ModestConstructorQuery_SelectMethods_Method_DirectCall_Result_ShouldNotBe_Null_Test()
        {
            // Arrange
            this.ValidateExecuteCondition(MethodSelectMethods);
            var type          = this.CreateType <Type>();
            var returnedValue = default(IEnumerable <IMethod>);

            // Act
            Action executeAction = () => returnedValue = _modestConstructorQueryInstance.SelectMethods(type);

            ActionAnalyzer.DoesActionThrowException(executeAction);

            // Assert
            returnedValue.ShouldNotBeNull();
        }
        public void AUT_MissingParametersSupplyingStaticMethodFactory_Create_Method_DirectCall_Result_ShouldNotBe_Null_Test()
        {
            // Arrange
            this.ValidateExecuteCondition(MethodCreate);
            var methodInfo    = this.CreateType <MethodInfo>();
            var returnedValue = default(IMethod);

            // Act
            Action executeAction = () => returnedValue = _missingParametersSupplyingStaticMethodFactoryInstance.Create(methodInfo);

            ActionAnalyzer.DoesActionThrowException(executeAction);

            // Assert
            returnedValue.ShouldNotBeNull();
        }
        public void AUT_Int16SequenceGenerator_Create_Method_DirectCall_Overloading_Of_1_Result_ShouldNotBe_Null_Test()
        {
            // Arrange
            this.ValidateExecuteCondition(MethodCreate);
            var request       = this.CreateType <object>();
            var context       = this.CreateType <ISpecimenContext>();
            var returnedValue = default(object);

            // Act
            Action executeAction = () => returnedValue = _int16SequenceGeneratorInstance.Create(request, context);

            ActionAnalyzer.DoesActionThrowException(executeAction);

            // Assert
            returnedValue.ShouldNotBeNull();
        }
Exemplo n.º 15
0
        public void AUT_TerminatingSpecimenBuilder_Create_Method_DirectCall_Result_ShouldBe_Null_Test()
        {
            // Arrange
            this.ValidateExecuteCondition(MethodCreate);
            var request       = this.CreateType <object>();
            var context       = this.CreateType <ISpecimenContext>();
            var returnedValue = default(object);

            // Act
            Action executeAction = () => returnedValue = _terminatingSpecimenBuilderInstance.Create(request, context);

            ActionAnalyzer.DoesActionThrowException(executeAction);

            // Assert
            returnedValue.ShouldBeNull();
        }
        public void AUT_AutoDataAttribute_BuildFrom_Method_DirectCall_Result_ShouldNotBe_Null_Test()
        {
            // Arrange
            this.ValidateExecuteCondition(MethodBuildFrom);
            var method        = this.CreateType <IMethodInfo>();
            var suite         = this.CreateType <Test>();
            var returnedValue = default(IEnumerable <TestMethod>);

            // Act
            Action executeAction = () => returnedValue = _autoDataAttributeInstance.BuildFrom(method, suite);

            ActionAnalyzer.DoesActionThrowException(executeAction);

            // Assert
            returnedValue.ShouldNotBeNull();
        }
        public void AUT_OmitEnumerableParameterRequestRelay_Create_Method_DirectCall_Result_ShouldNotBe_Null_Test()
        {
            // Arrange
            this.ValidateExecuteCondition(MethodCreate);
            var request       = this.CreateType <object>();
            var context       = this.CreateType <ISpecimenContext>();
            var returnedValue = default(object);

            // Act
            Action executeAction = () => returnedValue = _omitEnumerableParameterRequestRelayInstance.Create(request, context);

            ActionAnalyzer.DoesActionThrowException(executeAction);

            // Assert
            returnedValue.ShouldNotBeNull();
        }
        public void AUT_SpecimenBuilderNodeFactory_CreateTypedNode_Static_Method_DirectCall_Result_ShouldNotBe_Null_Test()
        {
            // Arrange
            this.ValidateExecuteCondition(MethodCreateTypedNode);
            var targetType    = this.CreateType <Type>();
            var factory       = this.CreateType <ISpecimenBuilder>();
            var returnedValue = default(FilteringSpecimenBuilder);

            // Act
            Action executeAction = () => returnedValue = SpecimenBuilderNodeFactory.CreateTypedNode(targetType, factory);

            ActionAnalyzer.DoesActionThrowException(executeAction);

            // Assert
            returnedValue.ShouldNotBeNull();
        }
        public void AUT_StrictlyMonotonicallyIncreasingDateTimeGenerator_Create_Method_DirectCall_Result_ShouldNotBe_Null_Test()
        {
            // Arrange
            this.ValidateExecuteCondition(MethodCreate);
            var request       = this.CreateType <object>();
            var context       = this.CreateType <ISpecimenContext>();
            var returnedValue = default(object);

            // Act
            Action executeAction = () => returnedValue = _strictlyMonotonicallyIncreasingDateTimeGeneratorInstance.Create(request, context);

            ActionAnalyzer.DoesActionThrowException(executeAction);

            // Assert
            returnedValue.ShouldNotBeNull();
        }
Exemplo n.º 20
0
        public void AUT_VolatileNameTestMethodBuilder_Build_Method_DirectCall_Result_ShouldNotBe_Null_Test()
        {
            // Arrange
            this.ValidateExecuteCondition(MethodBuild);
            var method             = this.CreateType <IMethodInfo>();
            var suite              = this.CreateType <Test>();
            var parameterValues    = this.CreateType <IEnumerable <object> >();
            var autoDataStartIndex = this.CreateType <int>();
            var returnedValue      = default(TestMethod);

            // Act
            Action executeAction = () => returnedValue = _volatileNameTestMethodBuilderInstance.Build(method, suite, parameterValues, autoDataStartIndex);

            ActionAnalyzer.DoesActionThrowException(executeAction);

            // Assert
            returnedValue.ShouldNotBeNull();
        }