public async Task WdcReaderInteractiveStoryAuthor() { WdcResponse payload = new WdcResponse(); payload.WebResponse = TestUtil.GetDataFile("sample_set_13_06_2019.Looking for adventure - homepage - logged in.html"); WdcAuthor result = _reader.GetInteractiveStoryAuthor(payload); Assert.AreEqual("The Nameless hermit", result.Name, "The author's name is not what was expected"); Assert.AreEqual("blackdragon", result.Username, "The author's username is not what was expected"); }
private void InitTestStory() { var testAuthor = new WdcAuthor() { Name = "Test name", Username = "******" }; // Story _testStory = new WdcInteractiveStory(); _testStory.Author = testAuthor; _testStory.ID = "123456-test-story-my-dude"; _testStory.Name = "Test Story 2: Electric Bogaloo"; _testStory.LastUpdatedInfo = DateTime.Now; _testStory.Url = "http://test.local/test-story-my-dude"; _testStory.ShortDescription = "Some story happened"; _testStory.Description = "<p>I am a test description</p>" + "absolutely <br /> for real."; // Chapter 1 _testStory.Chapters.Add(new WdcInteractiveChapter() { Author = testAuthor, Title = "The test story begins", Content = "This is a test... <br />CHAPTERRRRR!", Path = "1", Choices = new List <WdcInteractiveChapterChoice>() { new WdcInteractiveChapterChoice() { Name = "1st choice", PathLink = "11" }, new WdcInteractiveChapterChoice() { Name = "2st choice", PathLink = "12" }, new WdcInteractiveChapterChoice() { Name = "3st choice", PathLink = "13" }, } }); // Chapter 2 _testStory.Chapters.Add(new WdcInteractiveChapter() { Author = testAuthor, Title = "The test story continues", Content = "Then the people<br />\r\ndid<br />\r\nthings", Path = "11", Choices = new List <WdcInteractiveChapterChoice>() { new WdcInteractiveChapterChoice() { Name = "1st choice", PathLink = "11" }, new WdcInteractiveChapterChoice() { Name = "2st choice", PathLink = "12" }, new WdcInteractiveChapterChoice() { Name = "3st choice", PathLink = "13" }, } }); }