Ejemplo n.º 1
0
        protected override void OnSetUp()
        {
            this.factory = A.Fake(new FakeObjectFactory(A.Fake <IFakeObjectContainer>()));

            FakeObjectFactory.Creator creator = () => this.factory;

            this.StubResolve <FakeObjectFactory.Creator>(creator);
        }
Ejemplo n.º 2
0
        public void SetUp()
        {
            this.replacedServiceLocator = ServiceLocator.Current;
            ServiceLocator.Current      = A.Fake <ServiceLocator>(ServiceLocator.Current);

            this.factory = A.Fake(new FakeObjectFactory(A.Fake <IFakeObjectContainer>()));

            FakeObjectFactory.Creator creator = () => this.factory;

            Fake.Configure(ServiceLocator.Current)
            .CallsTo(x => x.Resolve(typeof(FakeObjectFactory.Creator)))
            .Returns(creator);
        }