public void ReadingIs5DigitsExpectSuccess() { MeterCsvValidator validator = new MeterCsvValidator(); Assert.IsTrue(validator.TryParseMeterReading("12345", out string meterReading)); Assert.AreEqual("12345", meterReading); }
public void ReadingIsNotANumberExpectFailure() { MeterCsvValidator validator = new MeterCsvValidator(); Assert.IsFalse(validator.TryParseMeterReading("12X45", out string meterReading)); }
public void ReadingIsNegativeExpectFailure() { MeterCsvValidator validator = new MeterCsvValidator(); Assert.IsFalse(validator.TryParseMeterReading("-12345", out string meterReading)); }
public void ReadingIsMissingExpectFailure() { MeterCsvValidator validator = new MeterCsvValidator(); Assert.IsFalse(validator.TryParseMeterReading("", out string meterReading)); }
public void ReadingIs6DigitsExpectFailure() { MeterCsvValidator validator = new MeterCsvValidator(); Assert.IsFalse(validator.TryParseMeterReading("123456", out string meterReading)); }