public void DateNoMismatchTest() { // ARRANGE DashboardEventRaw ev = JsonConvert.DeserializeObject <DashboardEventRaw>(File.ReadAllText("date_no_mismatch.json")); // ACT DateTime baseDate = EventTimelineUtilities.GetBaseDate(ev); // ASSERT Assert.Equal(new DateTime(2019, 5, 10, 0, 0, 0, DateTimeKind.Utc), baseDate); }
public void DateMismatchTest() { // ARRANGE DashboardEventRaw ev = JsonConvert.DeserializeObject <DashboardEventRaw>(File.ReadAllText("date_mismatch.json")); DateTime dt = ServiceUtilities.ConvertFromUnixTimestamp(Int64.Parse(ev.Date)); // ACT DateTime baseDate = EventTimelineUtilities.GetBaseDate(ev); // ASSERT Assert.Equal(new DateTime(2019, 5, 10, 0, 0, 0, DateTimeKind.Utc), baseDate); Assert.NotEqual(dt.Day, baseDate.Day); }