Exemplo n.º 1
0
        //private IYearSpanParser parser = new YearSpanParser();

        private void compare(String input, IYearSpan expected, EnumLanguage language)
        {
            //IInterval<int> result = parser.Parse(input);
            IYearSpan result = YearSpan.Parse(input, language);

            compare(result, expected);
        }
Exemplo n.º 2
0
        public void TestCardinalCenturyBC_IT()
        {
            string    input    = @"sec. VIII a.C.";
            IYearSpan expected = new YearSpan(-800, -701, input);
            IYearSpan result   = YearSpan.Parse(input, EnumLanguage.IT);

            compare(result, expected);
        }
Exemplo n.º 3
0
        public void Test1DigitMaxYear()
        {
            string    input    = @"1521-7";
            IYearSpan expected = new YearSpan(1521, 1527, input);
            //IInterval<int> result = parser.Parse(input);
            IYearSpan result = YearSpan.Parse(input, EnumLanguage.EN);

            compare(expected, result);
        }
Exemplo n.º 4
0
 public void TestArrayOfInput()
 {
     string[]    input    = { @"5th CENTURY", @"6th CENTURY" };
     IYearSpan[] expected =
     {
         new YearSpan(401, 500, input[0]),
         new YearSpan(501, 600, input[1])
     };
     IYearSpan[] result = YearSpan.Parse(input, EnumLanguage.EN);
     CollectionAssert.AreEqual(expected, result);
 }