public void BaseStyleInDerivedClassLinkGeneration() { var testCalendar = new TestCalendar(); var testCalendarStyleHref = ToolkitResourceManager.GetStyleHref(new ToolkitResourceManager.ResourceEntry("Calendar", testCalendar.GetType().BaseType, 0), testCalendar, TestGetWebResourceUrl); Assert.AreEqual("ToolkitHash.AjaxControlToolkit.Styles.Calendar.min.css", testCalendarStyleHref); }
public void DerivedStyleLinkGeneration() { var testCalendar = new TestCalendar(); var testCalendarStyleHref = ToolkitResourceManager.GetStyleHref(new ToolkitResourceManager.ResourceEntry("MyCalendar", testCalendar.GetType(), 0), testCalendar, TestGetWebResourceUrl); Assert.AreEqual("CustomHash.MyCalendar.min.css", testCalendarStyleHref); }
// // GET: /Blog/ public ActionResult Index() { TestCalendar test = new TestCalendar(); ViewBag.Content = test.Generate(); BlogIndexModel blogIndexModel = new BlogIndexModel() { ListBlogs = PysProvider.GetListBlogInfo(), SeoString = PysProvider.GetModuleInfoByName("blog").SeoString }; return View(blogIndexModel); }
public void LoadFromZip_OneCalendar() { TestCalendar expectedCal = new TestCalendar { ServiceId = "weekday", Monday = 1, Tuesday = 1, Wednesday = 1, Thursday = 1, Friday = 1, Saturday = 0, Sunday = 0, StartDate = TestFeedInfo.Sample.StartDate, EndDate = TestFeedInfo.Sample.EndDate }; _helper.TargetFileName = "onecalendar.zip"; _helper.FeedInfos.Add(TestFeedInfo.Sample); _helper.Calendars.Add(expectedCal); _helper.MakeZipFile(); Download target = new Download { download_date = DateTime.Now, download_file_name = _helper.TargetFilePath }; target.LoadFromZip(); Assert.AreEqual(1, target.Calendars.Count(), "checking Calendars count"); var actualCal = target.Calendars.ElementAt(0); Assert.AreEqual(expectedCal.ServiceId, actualCal.service_id, "checking Calendar 0 service_id"); Assert.AreEqual(expectedCal.Monday, actualCal.monday, "checking Calendar 0 monday"); Assert.AreEqual(expectedCal.Tuesday, actualCal.tuesday, "checking Calendar 0 tuesday"); Assert.AreEqual(expectedCal.Wednesday, actualCal.wednesday, "checking Calendar 0 wednesday"); Assert.AreEqual(expectedCal.Thursday, actualCal.thursday, "checking Calendar 0 thursday"); Assert.AreEqual(expectedCal.Friday, actualCal.friday, "checking Calendar 0 friday"); Assert.AreEqual(expectedCal.Saturday, actualCal.saturday, "checking Calendar 0 saturday"); Assert.AreEqual(expectedCal.Sunday, actualCal.sunday, "checking Calendar 0 sunday"); Assert.AreEqual(expectedCal.StartDate, actualCal.start_date, "checking Calendar 0 start_date"); Assert.AreEqual(expectedCal.EndDate, actualCal.end_date, "checking Calendar 0 end_date"); }
public void LoadFromZip_TwoCalendars() { TestCalendar expectedWeekday = new TestCalendar { ServiceId = "weekday", Monday = 1, Tuesday = 1, Wednesday = 1, Thursday = 1, Friday = 1, Saturday = 0, Sunday = 0, StartDate = TestFeedInfo.Sample.StartDate, EndDate = TestFeedInfo.Sample.EndDate }; TestCalendar expectedWeekend = new TestCalendar { ServiceId = "weekend", Monday = 0, Tuesday = 0, Wednesday = 0, Thursday = 0, Friday = 0, Saturday = 1, Sunday = 1, StartDate = TestFeedInfo.Sample.StartDate, EndDate = TestFeedInfo.Sample.EndDate }; _helper.TargetFileName = "twocalendars.zip"; _helper.FeedInfos.Add(TestFeedInfo.Sample); _helper.Calendars.Add(expectedWeekday); _helper.Calendars.Add(expectedWeekend); _helper.MakeZipFile(); Download target = new Download { download_date = DateTime.Now, download_file_name = _helper.TargetFilePath }; target.LoadFromZip(); Assert.AreEqual(2, target.Calendars.Count(), "checking Calendars count"); var actualWeekday = target.Calendars.ElementAt(0); Assert.AreEqual(expectedWeekday.ServiceId, actualWeekday.service_id, "checking Calendar 0 service_id"); Assert.AreEqual(expectedWeekday.Monday, actualWeekday.monday, "checking Calendar 0 monday"); Assert.AreEqual(expectedWeekday.Tuesday, actualWeekday.tuesday, "checking Calendar 0 tuesday"); Assert.AreEqual(expectedWeekday.Wednesday, actualWeekday.wednesday, "checking Calendar 0 wednesday"); Assert.AreEqual(expectedWeekday.Thursday, actualWeekday.thursday, "checking Calendar 0 thursday"); Assert.AreEqual(expectedWeekday.Friday, actualWeekday.friday, "checking Calendar 0 friday"); Assert.AreEqual(expectedWeekday.Saturday, actualWeekday.saturday, "checking Calendar 0 saturday"); Assert.AreEqual(expectedWeekday.Sunday, actualWeekday.sunday, "checking Calendar 0 sunday"); Assert.AreEqual(expectedWeekday.StartDate, actualWeekday.start_date, "checking Calendar 0 start_date"); Assert.AreEqual(expectedWeekday.EndDate, actualWeekday.end_date, "checking Calendar 0 end_date"); var actualWeekend = target.Calendars.ElementAt(1); Assert.AreEqual(expectedWeekend.ServiceId, actualWeekend.service_id, "checking Calendar 1 service_id"); Assert.AreEqual(expectedWeekend.Monday, actualWeekend.monday, "checking Calendar 1 monday"); Assert.AreEqual(expectedWeekend.Tuesday, actualWeekend.tuesday, "checking Calendar 1 tuesday"); Assert.AreEqual(expectedWeekend.Wednesday, actualWeekend.wednesday, "checking Calendar 1 wednesday"); Assert.AreEqual(expectedWeekend.Thursday, actualWeekend.thursday, "checking Calendar 1 thursday"); Assert.AreEqual(expectedWeekend.Friday, actualWeekend.friday, "checking Calendar 1 friday"); Assert.AreEqual(expectedWeekend.Saturday, actualWeekend.saturday, "checking Calendar 1 saturday"); Assert.AreEqual(expectedWeekend.Sunday, actualWeekend.sunday, "checking Calendar 1 sunday"); Assert.AreEqual(expectedWeekend.StartDate, actualWeekend.start_date, "checking Calendar 1 start_date"); Assert.AreEqual(expectedWeekend.EndDate, actualWeekend.end_date, "checking Calendar 1 end_date"); }
private void Start() { calendar.CustomLoadRaiders(); auxCalendar = calendar; }
public void Setup() { _meetingFileParser = new Mock <IMeetingFileParser>(); _calendar = new TestCalendar(); _meetingFileScheduler = new MeetingFileScheduler(_meetingFileParser.Object, _calendar); }