コード例 #1
0
        public void AccountIdIsPositiveIntegerExpectSuccess()
        {
            MeterCsvValidator validator = new MeterCsvValidator();

            Assert.IsTrue(validator.TryParseAccountId("78", out int accountId));
            Assert.AreEqual(78, accountId);
        }
コード例 #2
0
        public void AccountIdIsNotANumberExpectFailure()
        {
            MeterCsvValidator validator = new MeterCsvValidator();

            Assert.IsFalse(validator.TryParseAccountId("ABC", out int accountId));
        }
コード例 #3
0
        public void AccountIdIsDecimalExpectFailure()
        {
            MeterCsvValidator validator = new MeterCsvValidator();

            Assert.IsFalse(validator.TryParseAccountId("78.45", out int accountId));
        }
コード例 #4
0
        public void AccountIdIsNegativeIntegerExpectFailure()
        {
            MeterCsvValidator validator = new MeterCsvValidator();

            Assert.IsFalse(validator.TryParseAccountId("-78", out int accountId));
        }