public void CanExtractCVIDFromComicInfoNotes() { string notes = "Scraped metadata from ComicVine [CVDB9383] on 2013.06.03 23:14:42."; ComicVineEComicXMLDataReader dataReader = new ComicVineEComicXMLDataReader(); string id = dataReader.GetCVIDFromNotes(notes); Assert.IsTrue(id == "9383"); }
public void CanHandleNoCVIDFromComicInfoNotes() { string notes = ""; ComicVineEComicXMLDataReader dataReader = new ComicVineEComicXMLDataReader(); string id = dataReader.GetCVIDFromNotes(notes); Assert.IsTrue(id == ""); }
public void CanReadXMLIssueDataFromEComic() { ComicVineEComicXMLDataReader reader = new ComicVineEComicXMLDataReader(); string comicInfo = File.ReadAllText(TestXMLCRComicInfoFileName); Issue issue = reader.ReadIssueData(comicInfo); Assert.IsTrue(issue.id == 9383); Assert.IsTrue(issue.name == "Bugs the Squids"); Assert.IsTrue(issue.summary.StartsWith("The Squid Gang crash the party")); Assert.IsTrue(issue.issueNumber == 1); Assert.IsTrue(issue.publishMonth == 6); Assert.IsTrue(issue.publishYear == 1967); }