Load() public method

public Load ( System.Action callback ) : void
callback System.Action
return void
        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());
        }
Exemplo n.º 2
0
        public void Should_get_different_results_for_different_time_periods()
        {
            var model1 = new TopCommitters();
            model1.TimePeriod = TimePeriod.PastDay;
            model1.Load(() => { });
            var list1 = model1.Committers;

            model1.TimePeriod = TimePeriod.PastWeek;
            model1.Load(() => { });
            var list2 = model1.Committers;

            CollectionAssert.AreNotEqual(list1, list2);
        }