Exemple #1
0
        public void MeterReadingIsValidDateTimeExpectSuccess()
        {
            MeterCsvValidator validator = new MeterCsvValidator();

            Assert.IsTrue(validator.TryParseMeterReadingDateTime("20/05/2019 09:24", out DateTime meterReadingDateTime));
            Assert.AreEqual(new DateTime(2019, 05, 20, 9, 24, 0), meterReadingDateTime);
        }
Exemple #2
0
        public void MeterReadingIsInvalidDateTimeExpectFailure()
        {
            MeterCsvValidator validator = new MeterCsvValidator();

            Assert.IsFalse(validator.TryParseMeterReadingDateTime("31/04/2019 09:24", out DateTime meterReadingDateTime));
        }