Inheritance: IPersistenceService
示例#1
0
        public void SetUp()
        {
            fakePersistenceService = new FakePersistenceService();
            SmeedeeApp.Instance.ServiceLocator.Bind<IPersistenceService>(fakePersistenceService);
			SmeedeeApp.Instance.ServiceLocator.Bind<IValidationService>(new FakeValidationService());
            SmeedeeApp.Instance.ServiceLocator.Bind<ILog>(new FakeLogService());
            login = new Login();
        }
        public void Should_be_able_to_fetch_and_parse_service_when_server_is_running_on_localhost()
        {
            var persistance = new FakePersistenceService();
            SmeedeeApp.Instance.ServiceLocator.Bind<IPersistenceService>(persistance);
            SmeedeeApp.Instance.ServiceLocator.Bind<IBackgroundWorker>(new NoBackgroundInvocation());
            SmeedeeApp.Instance.ServiceLocator.Bind<ITopCommittersService>(new TopCommittersService());
            persistance.Save("Login_Url", "http://localhost:1155/Smeedee");

            var model = new TopCommitters();
            model.Load(() => { });
            Assert.AreNotEqual(0, model.Committers.Count());
        }
        public void SetUp()
        {
            SmeedeeApp.Instance.ServiceLocator.Bind<IBackgroundWorker>(new NoBackgroundInvocation());
			
            fakeService = new UnitTests.Fakes.FakeLatestCommitsService();
            countingService = new CallCountingLatestCommitsService();
			fakePersistence = new FakePersistenceService();
			
            SmeedeeApp.Instance.ServiceLocator.Bind<ILatestCommitsService>(fakeService);
            SmeedeeApp.Instance.ServiceLocator.Bind<IPersistenceService>(fakePersistence);
			
            model = new LatestCommits();
        }