public void SetUp()
        {
            this.managerFactory = () => this.managerToReturnFromFactory;
            this.managerToReturnFromFactory = A.Fake<FakeManager>();

            this.accessor = new DefaultFakeManagerAccessor(this.managerFactory);
        }
        public void SetUp()
        {
            this.managerFactory             = () => this.managerToReturnFromFactory;
            this.managerToReturnFromFactory = A.Fake <FakeManager>();

            this.accessor = new DefaultFakeManagerAccessor(this.managerFactory);
        }
        public FakeManagerProvider(
            FakeManager.Factory fakeManagerFactory,
            IFakeManagerAccessor fakeManagerAccessor,
            Type typeOfFake,
            IProxyOptions proxyOptions)
        {
            Guard.AgainstNull(fakeManagerFactory, "fakeManagerFactory");
            Guard.AgainstNull(fakeManagerAccessor, "fakeManagerAccessor");
            Guard.AgainstNull(typeOfFake, "typeOfFake");
            Guard.AgainstNull(proxyOptions, "proxyOptions");

            this.fakeManagerFactory  = fakeManagerFactory;
            this.fakeManagerAccessor = fakeManagerAccessor;
            this.typeOfFake          = typeOfFake;
            this.proxyOptions        = proxyOptions;
        }
        public FakeManagerProvider(
            FakeManager.Factory fakeManagerFactory,
            IFakeManagerAccessor fakeManagerAccessor,
            Type typeOfFake,
            IProxyOptions proxyOptions)
        {
            Guard.AgainstNull(fakeManagerFactory, nameof(fakeManagerFactory));
            Guard.AgainstNull(fakeManagerAccessor, nameof(fakeManagerAccessor));
            Guard.AgainstNull(typeOfFake, nameof(typeOfFake));
            Guard.AgainstNull(proxyOptions, nameof(proxyOptions));

            this.fakeManagerFactory  = fakeManagerFactory;
            this.fakeManagerAccessor = fakeManagerAccessor;
            this.typeOfFake          = typeOfFake;
            this.proxyOptions        = proxyOptions;
        }
        public FakeManagerProvider(
            FakeManager.Factory fakeManagerFactory,
            IFakeManagerAccessor fakeManagerAccessor,
            IFakeObjectConfigurator configurer,
            Type typeOfFake)
        {
            Guard.AgainstNull(fakeManagerFactory, "fakeManagerFactory");
            Guard.AgainstNull(fakeManagerAccessor, "fakeManagerAccessor");
            Guard.AgainstNull(configurer, "configurer");
            Guard.AgainstNull(typeOfFake, "typeOfFake");

            this.fakeManagerFactory  = fakeManagerFactory;
            this.fakeManagerAccessor = fakeManagerAccessor;
            this.configurer          = configurer;
            this.typeOfFake          = typeOfFake;
        }
        public FakeManagerProvider(
                FakeManager.Factory fakeManagerFactory,
                IFakeManagerAccessor fakeManagerAccessor,
                Type typeOfFake,
                IProxyOptions proxyOptions)
        {
            Guard.AgainstNull(fakeManagerFactory, "fakeManagerFactory");
            Guard.AgainstNull(fakeManagerAccessor, "fakeManagerAccessor");
            Guard.AgainstNull(typeOfFake, "typeOfFake");
            Guard.AgainstNull(proxyOptions, "proxyOptions");

            this.fakeManagerFactory = fakeManagerFactory;
            this.fakeManagerAccessor = fakeManagerAccessor;
            this.typeOfFake = typeOfFake;
            this.proxyOptions = proxyOptions;
        }
Example #7
0
        public FakeManagerProvider(
                FakeManager.Factory fakeManagerFactory,
                IFakeManagerAccessor fakeManagerAccessor,
                Type typeOfFake,
                IProxyOptions proxyOptions)
        {
            Guard.AgainstNull(fakeManagerFactory, nameof(fakeManagerFactory));
            Guard.AgainstNull(fakeManagerAccessor, nameof(fakeManagerAccessor));
            Guard.AgainstNull(typeOfFake, nameof(typeOfFake));
            Guard.AgainstNull(proxyOptions, nameof(proxyOptions));

            this.fakeManagerFactory = fakeManagerFactory;
            this.fakeManagerAccessor = fakeManagerAccessor;
            this.typeOfFake = typeOfFake;
            this.proxyOptions = proxyOptions;
        }
        public FakeManagerProviderTests()
        {
            this.fakeManagerFactory  = A.Fake <FakeManager.Factory>();
            this.fakeManagerAccessor = A.Fake <IFakeManagerAccessor>();
            this.typeOfFake          = A.Fake <Type>();
            this.proxyOptions        = A.Fake <IProxyOptions>();

            this.fakeManagerProvider = new FakeManagerProvider(
                this.fakeManagerFactory,
                this.fakeManagerAccessor,
                this.typeOfFake,
                this.proxyOptions);

            this.proxy       = new object();
            this.fakeManager = new FakeManager(typeof(int), this.proxy, null);
            A.CallTo(() => this.fakeManagerFactory(A <Type> ._, this.proxy, A <string> .Ignored)).Returns(this.fakeManager);
        }
        public FakeManagerProvider(
                FakeManager.Factory fakeManagerFactory,
                IFakeManagerAccessor fakeManagerAccessor,
                IFakeObjectConfigurator fakeObjectConfigurator, 
                Type typeOfFake,
                FakeOptions fakeOptions)
        {
            Guard.AgainstNull(fakeManagerFactory, "fakeManagerFactory");
            Guard.AgainstNull(fakeManagerAccessor, "fakeManagerAccessor");
            Guard.AgainstNull(fakeObjectConfigurator, "fakeObjectConfigurator");
            Guard.AgainstNull(typeOfFake, "typeOfFake");
            Guard.AgainstNull(fakeOptions, "fakeOptions");

            this.fakeManagerFactory = fakeManagerFactory;
            this.fakeManagerAccessor = fakeManagerAccessor;
            this.fakeObjectConfigurator = fakeObjectConfigurator;
            this.typeOfFake = typeOfFake;
            this.fakeOptions = fakeOptions;
        }
Example #10
0
        public FakeManagerProvider(
            FakeManager.Factory fakeManagerFactory,
            IFakeManagerAccessor fakeManagerAccessor,
            IFakeObjectConfigurator fakeObjectConfigurator,
            Type typeOfFake,
            FakeOptions fakeOptions)
        {
            Guard.AgainstNull(fakeManagerFactory, "fakeManagerFactory");
            Guard.AgainstNull(fakeManagerAccessor, "fakeManagerAccessor");
            Guard.AgainstNull(fakeObjectConfigurator, "fakeObjectConfigurator");
            Guard.AgainstNull(typeOfFake, "typeOfFake");
            Guard.AgainstNull(fakeOptions, "fakeOptions");

            this.fakeManagerFactory     = fakeManagerFactory;
            this.fakeManagerAccessor    = fakeManagerAccessor;
            this.fakeObjectConfigurator = fakeObjectConfigurator;
            this.typeOfFake             = typeOfFake;
            this.fakeOptions            = fakeOptions;
        }
 public DefaultFakeManagerAccessor(FakeManager.Factory managerFactory)
 {
     this.managerFactory = managerFactory;
 }
 public DefaultFakeManagerAccessor(FakeManager.Factory managerFactory)
 {
     this.managerFactory = managerFactory;
 }