public void ParseXMLTest(string list) { //Arrange var goodreads = new GoodreadsInterface(); goodreads.CallApi(list); //Act bool ParseSuccess = goodreads.ParseXML(); //Assert to XMLClass Assert.IsTrue(ParseSuccess); //Assert to Book }
public void CallApiTest(string list, string filename) { //Arrange var goodreads = new GoodreadsInterface(); //Act bool CallSuccess = goodreads.CallApi(list); //Assert Assert.IsTrue(CallSuccess); var taskStr = goodreads.rawResponse.ReadAsStringAsync(); var content = taskStr.Result; var xDoc = new XmlDocument(); xDoc.LoadXml(content); }
public void Manual_UpdateTest() { var books = new List <Models.Book>(); var book = new Models.Book(); book.id = "12345"; book.DateAdded = DateTime.Now.ToString(); book.Title = "abcd"; book.imageLink = "www.website.com"; books.Add(book); try { GoodreadsInterface.UpdateModel(books); } catch (Exception ex) { Console.WriteLine(ex.Message); Console.WriteLine(ex.InnerException); Console.WriteLine(ex.StackTrace); } }
public void UpdateTest() { var favBooksInterface = new GoodreadsInterface(); Assert.IsTrue(favBooksInterface.Update()); }