Beispiel #1
0
 public void Given_A_DataModel_With_An_Open_Publishing_The_Agenda_Calendar_Item()
 {
     _calendarItemRepository = Substitute.For <ICalendarItemRepository>();
     _calendarItemRepository.GetAll().Returns(new List <CalendarItem>
     {
         new CalendarItem
         {
             EntryType  = CalendarEntryType.SessionSubmission,
             Authorised = true,
             StartDate  = DateTimeOffset.Now.AddDays(-2),
             EndDate    = DateTimeOffset.Now.AddDays(-1)
         },
         new CalendarItem
         {
             EntryType  = CalendarEntryType.Voting,
             Authorised = true,
             StartDate  = DateTimeOffset.Now.AddDays(-2),
             EndDate    = DateTimeOffset.Now.AddDays(-1)
         },
         new CalendarItem
         {
             EntryType  = CalendarEntryType.AgendaPublished,
             Authorised = true,
             StartDate  = DateTimeOffset.Now.AddDays(-2),
             EndDate    = null
         }
     });
     _source = new DDDEastAnglia.DataAccess.SimpleData.Models.Conference
     {
         ConferenceId = 1,
         Name         = "",
         ShortName    = ""
     };
 }
Beispiel #2
0
 private void Given_A_DataModel_With_No_CalendarItems()
 {
     _calendarItemRepository = Substitute.For <ICalendarItemRepository>();
     _calendarItemRepository.GetAll().Returns(new CalendarItem[0]);
     _source = new DDDEastAnglia.DataAccess.SimpleData.Models.Conference
     {
         ConferenceId = 1,
         Name         = "",
         ShortName    = ""
     };
 }
 public void Given_A_DataModel_With_An_Open_Publishing_The_Agenda_Calendar_Item()
 {
     _calendarItemRepository = Substitute.For<ICalendarItemRepository>();
     _calendarItemRepository.GetAll().Returns(new List<CalendarItem>
                 {
                     new CalendarItem
                         {
                             EntryType = CalendarEntryType.SessionSubmission,
                             Authorised = true,
                             StartDate = DateTimeOffset.Now.AddDays(-2),
                             EndDate = DateTimeOffset.Now.AddDays(-1)
                         },
                     new CalendarItem
                         {
                             EntryType = CalendarEntryType.Voting,
                             Authorised = true,
                             StartDate = DateTimeOffset.Now.AddDays(-2),
                             EndDate = DateTimeOffset.Now.AddDays(-1)
                         },
                     new CalendarItem
                         {
                             EntryType = CalendarEntryType.AgendaPublished,
                             Authorised = true,
                             StartDate = DateTimeOffset.Now.AddDays(-2),
                             EndDate = null
                         }
                 });
     _source = new DDDEastAnglia.DataAccess.SimpleData.Models.Conference
     {
         ConferenceId = 1,
         Name = "",
         ShortName = ""
     };
 }
 private void Given_A_DataModel_With_No_CalendarItems()
 {
     _calendarItemRepository = Substitute.For<ICalendarItemRepository>();
     _calendarItemRepository.GetAll().Returns(new CalendarItem[0]);
     _source = new DDDEastAnglia.DataAccess.SimpleData.Models.Conference
         {
             ConferenceId = 1,
             Name = "",
             ShortName = ""
         };
 }