Ejemplo n.º 1
0
        public void GetCurrentFinantialYearAfterSettingCurrentFinantialYear()
        {
            var inputYears     = new [] { "", null, "2000", "2012", "", "3014", "1", "abc", "1900", "3000", "1200", "2999" };
            var expectedValues = new [] { "1900", "1900", "2000", "2012", "1900", "1900", "1900", "1900", "1900", "3000", "1900", "2999" };

            for (int i = 0; i < inputYears.Count(); i++)
            {
                _parameterManager.SetCurrentFinancialYear(inputYears[i]);

                string expected = expectedValues[i];
                string actual   = _parameterManager.GetCurrentFinancialYear();
                Assert.AreEqual(expected, actual, "After setting finantial year to the database, we must get finantial year when we call for it.");
                //Finantial year must be between 1900-3000 AD
            }
        }