コード例 #1
0
        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
        }
コード例 #2
0
        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);
        }