Esempio n. 1
0
        public NMockitoInstance()
        {
            Instance = this;

            proxyGenerator = new ProxyGenerator();
            invocationDescriptorFactory = new InvocationDescriptorFactory();
            IReadOnlyList <InvocationTransformation> transformations = new InvocationTransformation[] {
                new OutEnablingInvocationTransformationImpl(),
                new UnwrapParamsInvocationTransformationImpl(),
                new CreateImplicitEqualitySmartParametersInvocationTransformationImpl()
            };

            invocationTransformer = new InvocationTransformer(transformations);
            var verificationInvocationsContainer = new VerificationInvocationsContainer();

            invocationStage = new InvocationStage(verificationInvocationsContainer);
            invocationOperationManagerFinder = new InvocationOperationManagerFinder();
            mockFactory            = new MockFactoryImpl(proxyGenerator, invocationDescriptorFactory, invocationTransformer, invocationStage, invocationOperationManagerFinder);
            smartParameterStore    = new SmartParameterStore();
            smartParameterPusher   = new SmartParameterPusher(smartParameterStore);
            assertionsProxy        = new AssertionsProxy();
            expectationFactory     = new ExpectationFactory(invocationStage, invocationOperationManagerFinder, verificationInvocationsContainer);
            verificationOperations = new VerificationOperations(invocationStage, verificationInvocationsContainer);
            ExceptionCaptorFactory exceptionCaptorFactory = new ExceptionCaptorFactory(proxyGenerator);

            fluentExceptionAssertor = new FluentExceptionAssertor(exceptionCaptorFactory);
            VerificationMockFactory verificationMockFactory = new VerificationMockFactory(proxyGenerator);

            verificationOperationsProxy = new VerificationOperationsProxy(invocationStage, verificationOperations, verificationMockFactory);
            placeholderFactory          = new PlaceholderFactory(mockFactory);
        }
Esempio n. 2
0
 public VerificationOperationsProxy(InvocationStage invocationStage, VerificationOperations verificationOperations, VerificationMockFactory verificationMockFactory)
 {
     this.invocationStage         = invocationStage;
     this.verificationOperations  = verificationOperations;
     this.verificationMockFactory = verificationMockFactory;
 }
Esempio n. 3
0
 public VerificationOperations(InvocationStage invocationStage, VerificationInvocationsContainer verificationInvocationsContainer)
 {
     this.invocationStage = invocationStage;
     this.verificationInvocationsContainer = verificationInvocationsContainer;
 }
Esempio n. 4
0
 public ExpectationFactory(InvocationStage invocationStage, InvocationOperationManagerFinder invocationOperationManagerFinder, VerificationInvocationsContainer verificationInvocationsContainer)
 {
     this.invocationStage = invocationStage;
     this.invocationOperationManagerFinder = invocationOperationManagerFinder;
     this.verificationInvocationsContainer = verificationInvocationsContainer;
 }