Ejemplo n.º 1
0
 public DiaryPresenter(IClock clock, Diary diary, License license)
 {
     this.clock = clock;
     this.diary = diary;
     this.license = license;
     Debug.WriteLine("DiaryPresenter Constructor");
 }
Ejemplo n.º 2
0
 public void FormatTodayIsoUtc()
 {
     var c = new StubClock(Instant.UnixEpoch);
     var d = new Diary(c, CalendarSystem.Iso, DateTimeZone.Utc);
     string t = d.FormatToday();
     Assert.AreEqual("1970-01-01",t);
     Debug.WriteLine("Diary says FormatTodayIsoUtc is:" + t);
 }
Ejemplo n.º 3
0
 public void FormatTodayIsoNegativeOffset()
 {
     var c = new StubClock(Instant.UnixEpoch);
     var z = DateTimeZone.ForId("America/New_York");
     var d = new Diary(c, CalendarSystem.Iso, z);
     string t = d.FormatToday();
     Assert.AreEqual("1969-12-31", t);
     Debug.WriteLine("Diary says FormatTodayIsoUtc is:" + t);
 }
Ejemplo n.º 4
0
 private static void ManualDependencyInjectionTest()
 {
     var c = SystemClock.Instance;
     var l = new License(Instant.UnixEpoch, c);
     var d = new Diary(c, CalendarSystem.Iso, DateTimeZone.GetSystemDefault());
     var p = new DiaryPresenter(c, d, l);
     p.Start();
 }