예제 #1
0
        public void NonNumericDayIsHandled()
        {
            const string badInput = "Fred/10/2014";

            Assert.Throws <ArgumentException>(() => DateCalculator.GetDateFromString(badInput));
        }
예제 #2
0
        public void NegativeInputThrowsException()
        {
            const string badInput = "-13/10/2014";

            Assert.Throws <ArgumentException>(() => DateCalculator.GetDateFromString(badInput));
        }
예제 #3
0
        public void ZeroInputThrowsException()
        {
            const string badInput = "13/10/0";

            Assert.Throws <ArgumentException>(() => DateCalculator.GetDateFromString(badInput));
        }
예제 #4
0
        public void WhenDayMissingExceptionIsThrown()
        {
            const string badInput = "11/2010";

            Assert.Throws <ArgumentException>(() => DateCalculator.GetDateFromString(badInput));
        }