Example #1
0
        public void ConvertRangeYearsTest()
        {
            string        expectedResult = "01.02.1996-01.04.1997";
            DateConverter date           = new DateConverter("01.02.1996", "01.04.1997");

            date.Validate(out _);
            string result = date.ConvertRange();

            Assert.AreEqual(expectedResult, result);
        }
Example #2
0
        public void ConvertRangeExceptionTest()
        {
            DateConverter date             = new DateConverter("01.02.1996", "02.02.1996");
            bool          exceptionThrowed = false;

            try
            {
                string result = date.ConvertRange();
            }
            catch
            {
                exceptionThrowed = true;
            }
            Assert.IsTrue(exceptionThrowed);
        }