Пример #1
0
 public FakeObjectCreator(IProxyGenerator proxyGenerator, IExceptionThrower thrower, FakeCallProcessorProvider.Factory fakeCallProcessorProviderFactory)
 {
     this.proxyGenerator = proxyGenerator;
     this.thrower        = thrower;
     this.fakeCallProcessorProviderFactory = fakeCallProcessorProviderFactory;
     this.parameterTypesCache = new ConcurrentDictionary <Type, Type[]>();
 }
Пример #2
0
 public DelegateCreationStrategy(
     IMethodInterceptionValidator methodInterceptionValidator,
     FakeCallProcessorProvider.Factory fakeCallProcessorProviderFactory)
 {
     this.methodInterceptionValidator      = methodInterceptionValidator;
     this.fakeCallProcessorProviderFactory = fakeCallProcessorProviderFactory;
 }
Пример #3
0
 public DefaultCreationStrategy(
     IMethodInterceptionValidator methodInterceptionValidator,
     FakeCallProcessorProvider.Factory fakeCallProcessorProviderFactory)
 {
     this.methodInterceptionValidator      = methodInterceptionValidator;
     this.fakeCallProcessorProviderFactory = fakeCallProcessorProviderFactory;
     this.parameterTypesCache = new ConcurrentDictionary <Type, Type[]>();
 }
Пример #4
0
        public void Setup()
        {
            this.proxyGenerator = A.Fake <IProxyGenerator>();
            this.thrower        = A.Fake <IExceptionThrower>();
            this.fakeCallProcessorProviderFactory = A.Fake <FakeCallProcessorProvider.Factory>();

            this.fakeObjectCreator = new FakeObjectCreator(this.proxyGenerator, this.thrower, this.fakeCallProcessorProviderFactory);
        }
Пример #5
0
 public FakeObjectCreator(
     FakeCallProcessorProvider.Factory fakeCallProcessorProviderFactory,
     IMethodInterceptionValidator castleMethodInterceptionValidator,
     IMethodInterceptionValidator delegateMethodInterceptionValidator)
 {
     this.defaultCreationStrategy  = new DefaultCreationStrategy(castleMethodInterceptionValidator, fakeCallProcessorProviderFactory);
     this.delegateCreationStrategy = new DelegateCreationStrategy(delegateMethodInterceptionValidator, fakeCallProcessorProviderFactory);
 }
Пример #6
0
        public FakeObjectCreatorTests()
        {
            this.fakeCallProcessorProviderFactory = A.Fake <FakeCallProcessorProvider.Factory>();

            this.fakeObjectCreator = new FakeObjectCreator(
                this.fakeCallProcessorProviderFactory,
                A.Dummy <IMethodInterceptionValidator>(),
                A.Dummy <IMethodInterceptionValidator>());
        }
        public FakeObjectCreatorTests()
        {
            this.proxyGenerator = A.Fake <IProxyGenerator>();
            string s;

            A.CallTo(() => this.proxyGenerator.CanGenerateProxy(A <Type> ._, out s)).WithAnyArguments().Returns(true);
            this.thrower = A.Fake <IExceptionThrower>();
            this.fakeCallProcessorProviderFactory = A.Fake <FakeCallProcessorProvider.Factory>();

            this.fakeObjectCreator = new FakeObjectCreator(this.proxyGenerator, this.thrower, this.fakeCallProcessorProviderFactory);
        }
Пример #8
0
 public FakeObjectCreator(IProxyGenerator proxyGenerator, IExceptionThrower thrower, FakeCallProcessorProvider.Factory fakeCallProcessorProviderFactory)
 {
     this.proxyGenerator = proxyGenerator;
     this.thrower = thrower;
     this.fakeCallProcessorProviderFactory = fakeCallProcessorProviderFactory;
 }
Пример #9
0
 public FakeObjectCreator(IProxyGenerator proxyGenerator, IExceptionThrower thrower, FakeCallProcessorProvider.Factory fakeCallProcessorProviderFactory)
 {
     this.proxyGenerator = proxyGenerator;
     this.thrower        = thrower;
     this.fakeCallProcessorProviderFactory = fakeCallProcessorProviderFactory;
 }