Esempio n. 1
0
        public void ShouldParseDateTime2()
        {
            string line            = "1970-01-01T00:02:00";
            string dateTimePattern = "yyyy-MM-ddTHH:mm:ss";
            var    service         = new EventSavingService();
            var    parsedDT        = service.ParseDateTime(line, dateTimePattern);

            Assert.Equal(DateTimeExtensions.CreateNodaTime(1970, 1, 1, 0, 2, 0), parsedDT);
        }
Esempio n. 2
0
        public void ShouldParseDateTime()
        {
            string line            = "1970-01-01T00:00:00";
            string dateTimePattern = "yyyy-MM-ddTHH:mm:ss";
            var    service         = new EventSavingService();
            var    parsedDT        = service.ParseDateTime(line, dateTimePattern);

            Assert.Equal(NodaTime.Instant.FromUnixTimeTicks(0), parsedDT);
        }