public void ParseTest2()
        {
            string       input    = "john 3:16; gen 20-21,24";
            RawReference expected = new RawReference();

            expected.Add(new RawRange
            {
                FirstBook           = "john",
                FirstChapter        = 3,
                FirstVerse          = 16,
                FirstVerseSuffix    = null,
                IsFirstBookExplicit = true,
                SecondBook          = "john",
                SecondChapter       = 3,
                SecondVerse         = 16,
                SecondVerseSuffix   = null
            });

            expected.Add(new RawRange
            {
                FirstBook           = "gen",
                FirstChapter        = 20,
                FirstVerseString    = null,
                FirstVerseSuffix    = null,
                IsFirstBookExplicit = true,
                SecondBook          = "gen",
                SecondChapter       = 21,
                SecondVerseString   = null,
                SecondVerseSuffix   = null
            });

            expected.Add(new RawRange
            {
                FirstBook           = "gen",
                FirstChapter        = 24,
                FirstVerseString    = null,
                FirstVerseSuffix    = null,
                IsFirstBookExplicit = false,
                SecondBook          = "gen",
                SecondChapter       = 24,
                SecondVerseString   = null,
                SecondVerseSuffix   = null
            });

            RawReference actual;

            actual = RawReference.Parse(input);
            CollectionAssert.AreEquivalent(expected, actual);
            //Assert.Inconclusive("Verify the correctness of this test method.");
        }
        public void ParseTest()
        {
            string input = "john 3:16; gen 20-21";
            RawReference expected = new RawReference();

            expected.Add(new RawRange
            {
                FirstBook="john",
                FirstChapter=3,
                FirstVerse=16,
                FirstVerseSuffix=null,
                IsFirstBookExplicit = true,
                SecondBook = "john",
                SecondChapter = 3,
                SecondVerse = 16,
                SecondVerseSuffix = null
            });

            expected.Add(new RawRange
            {
                FirstBook = "gen",
                FirstChapter = 20,
                FirstVerseString = null,
                FirstVerseSuffix = null,
                IsFirstBookExplicit = true,
                SecondBook = "gen",
                SecondChapter = 21,
                SecondVerseString = null,
                SecondVerseSuffix = null
            });

            RawReference actual;
            actual = RawReference.Parse(input);
            CollectionAssert.AreEquivalent(expected, actual);
            //Assert.Inconclusive("Verify the correctness of this test method.");
        }
Exemple #3
0
 internal ReferenceFixup(DataCoreDatabase database, object instance, PropertyInfo info, RawReference reference)
     : base(database, instance, info)
 {
     Reference = reference;
 }