Esempio n. 1
0
 private void TheDayIs(CalendarDay day)
 {
     this.day = day;
     _documentService = Substitute.For<IDocumentService>();
     _documentService.Query(Arg.Any<AccountByNameSlug>()).Returns((new List<Account> { account }).AsQueryable());
     controller = new TodayController(_documentService);
 }
Esempio n. 2
0
        private void ADayWithSomeCompleteAndSomeIncompleteGoals()
        {
            account = Build.An<Account>();
            today = new CalendarDay(2010, 9, 17);
            tomorrow = new CalendarDay(2010, 9, 18);
            account.AddGoal("thing I did", today);
            account.Done(account.Goals.First(g => g.Description.Equals("thing I did")).Id);
            account.AddGoal("thing I should have done", today);
            account.AddGoal("something else I did", today);
            account.Done(account.Goals.First(g => g.Description.Equals("something else I did")).Id);
            account.AddGoal("something I forgot to do", today);
            account.AddGoal("something I will do tomorrow", tomorrow);

            var docService = Substitute.For<IDocumentService>();
            docService.Query(Arg.Any<AccountByNameSlug>()).Returns(new [] {account}.AsQueryable());
            controller = new TodayController(docService);
        }