Esempio n. 1
0
        public virtual void SetUp()
        {
            this.ClearAll();

            this.mockDispatcher = new MockDispatcher();

            Ioc.RegisterSingleton<IMvxViewDispatcher>(this.mockDispatcher);
            Ioc.RegisterSingleton<IMvxMainThreadDispatcher>(this.mockDispatcher);
            Ioc.RegisterSingleton<IMvxTrace>(new TestTrace());
            Ioc.RegisterSingleton<IMvxSettings>(new MvxSettings());

            this.Initialize();
            this.CreateTestableObject();

            // for navigation parsing
            Ioc.RegisterSingleton<IMvxStringToTypeParser>(new MvxStringToTypeParser());

            Ioc.RegisterSingleton<ISQLiteConnectionFactory>(new MvxWpfSqLiteConnectionFactory());
            Ioc.RegisterSingleton<IMvxMessenger>(new MvxMessengerHub());

            var barcodeScannerMock = new Mock<IBarCodeScanner> ();

            Ioc.RegisterSingleton<IBarCodeScanner>(barcodeScannerMock.Object);

            SocialShopper.Core.App.InitializeServices(CreatableTypes);

            SocialShopper.Core.App.InitializeData();
        }
Esempio n. 2
0
        public virtual void SetUp()
        {
            this.ClearAll();

            this.mockDispatcher = new MockDispatcher();

            Ioc.RegisterSingleton<IMvxViewDispatcher>(this.mockDispatcher);
            Ioc.RegisterSingleton<IMvxMainThreadDispatcher>(this.mockDispatcher);
            Ioc.RegisterSingleton<IMvxTrace>(new TestTrace());
            Ioc.RegisterSingleton<IMvxSettings>(new MvxSettings());

            this.Initialize();
            this.CreateTestableObject();
        }
Esempio n. 3
0
        public virtual void SetUp()
        {
            this.ClearAll();

            this.mockDispatcher = new MockDispatcher();

            Ioc.RegisterSingleton<IMvxViewDispatcher>(this.mockDispatcher);
            Ioc.RegisterSingleton<IMvxMainThreadDispatcher>(this.mockDispatcher);
            Ioc.RegisterSingleton<IMvxTrace>(new TestTrace());
            Ioc.RegisterSingleton<IMvxSettings>(new MvxSettings());

            Ioc.RegisterSingleton<IMvxFileStore>(new MvxWpfFileStore());

            Ioc.RegisterType<ILocalDataService, LocalDataService>();
            Ioc.RegisterType<IMvxMessenger, MvxMessengerHub>();
            Ioc.RegisterType<IFollowService, MockFollowService>();

            this.Initialize();
            this.CreateTestableObject();
        }