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"); }
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"); }
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); } }); }