Esempio n. 1
0
        public void TestParseUncheckedIsan()
        {
            const string uncheckedNumber = "00000000E0AA000000000001";

            var isan = Isan.TryParse(uncheckedNumber);

            Assert.IsNotNull(isan);
            Assert.AreEqual(isan.Root, "00000000E0AA");
            Assert.AreEqual(isan.Episode, "0000");
            Assert.AreEqual(isan.Version, "00000001");
        }
Esempio n. 2
0
        public void TestParseCheckedIsanWithAlphaCheckDigits()
        {
            const string checkedNumber = "00000000E0660000A00000000S";

            var isan = Isan.TryParse(checkedNumber);

            Assert.IsNotNull(isan);
            Assert.AreEqual(isan.Root, "00000000E066");
            Assert.AreEqual(isan.Episode, "0000");
            Assert.AreEqual(isan.Version, "00000000");
        }
Esempio n. 3
0
        private void SetParent(VIsan vIsan, CQ dom)
        {
            if (_token.IsCancelled || dom == null)
            {
                return;
            }

            var titles = dom["a[href*=\"javascript:publicDisplayWork\"]"];

            titles.ForEach(delegate(IDomObject o)
            {
                var href = (o.GetAttribute("href") ?? "").Trim();
                if (Isan.IsIsan(href))
                {
                    vIsan.Parent = Isan.TryParse(href);
                }
            });
        }