예제 #1
0
 public void TestFreeBusyToString()
 {
     SystemTime.Now = () => new DateTime(2013, 8, 1, 1, 0, 0);
     Room r = new Room { Uri = new Uri(Path.Combine(Directory.GetCurrentDirectory(), "../../fixture/RES-PHAR-129.ics")), RoomNumber = "RES-PHAR-129" };
     r.Load(r.Uri);
     Assert.AreEqual("Busy for 2 hours, and 45 minutes", r.FreeBusyToString(new DateTime(2013, 8, 1, 10, 15, 0)).ToString());
     //This may be best said as "free for about 4 days, and 21 hours
     Assert.AreEqual("Free for 4 days, and 21 hours", r.FreeBusyToString(new DateTime(2013, 8, 1, 13, 15, 0)).ToString());
 }
예제 #2
0
 public void TestFreeBusyToStringException()
 {
     Room r = new Room { Uri = new Uri(Path.Combine(Directory.GetCurrentDirectory(), "../../fixture/RES-PHAR-129.ics")), RoomNumber = "RES-PHAR-129" };
     //Missing load function here...
     Assert.AreEqual("", r.FreeBusyToString(new DateTime(2013, 8, 1, 10, 15, 0)));
 }