コード例 #1
0
 public FakeObjectCreator(IProxyGenerator proxyGenerator, IExceptionThrower thrower, IFakeManagerAccessor fakeManagerAttacher, IFakeObjectConfigurator configurer)
 {
     this.proxyGenerator = proxyGenerator;
     this.thrower = thrower;
     this.fakeManagerAttacher = fakeManagerAttacher;
     this.configurer = configurer;
 }
コード例 #2
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);
        }
コード例 #3
0
        public void SetUp()
        {
            this.proxyGenerator      = A.Fake <IProxyGenerator>();
            this.thrower             = A.Fake <IExceptionThrower>();
            this.fakeManagerAttacher = A.Fake <IFakeManagerAccessor>();
            this.configurer          = A.Fake <IFakeObjectConfigurator>();

            this.fakeObjectCreator = new FakeObjectCreator(this.proxyGenerator, this.thrower, this.fakeManagerAttacher, this.configurer);
        }
コード例 #4
0
        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);
        }
コード例 #5
0
 public override void Given()
 {
     ProxiedInstance =
         ExceptionHandlingDynamicProxyFactory.Create(
             InstanceToProxy,
             new IExceptionExploder[0],
             new IExceptionMapper[]
     {
         new MockArgumentExceptionMapper()
     });
 }
コード例 #6
0
 public override void Given()
 {
     ProxiedInstance =
         ExceptionHandlingDynamicProxyFactory.Create(
             InstanceToProxy,
             Enumerable.Empty <IExceptionExploder>(),
             new[]
     {
         new MockArgumentExceptionMapper()
     });
 }
コード例 #7
0
 public FakeObjectCreator(IProxyGenerator proxyGenerator, IExceptionThrower thrower, FakeCallProcessorProvider.Factory fakeCallProcessorProviderFactory)
 {
     this.proxyGenerator = proxyGenerator;
     this.thrower = thrower;
     this.fakeCallProcessorProviderFactory = fakeCallProcessorProviderFactory;
 }
コード例 #8
0
 public FakeObjectCreator(IProxyGenerator proxyGenerator, IExceptionThrower thrower, FakeCallProcessorProvider.Factory fakeCallProcessorProviderFactory)
 {
     this.proxyGenerator = proxyGenerator;
     this.thrower        = thrower;
     this.fakeCallProcessorProviderFactory = fakeCallProcessorProviderFactory;
 }