public async Task <IEnumerable <BaseModel> > GetSeriesList()
        {
            Uri AllSeriesUrl = new Uri(Selected.AllSeriesUrl);
            //Download Html document
            string doc = await _download.LoadDocumentAsync(AllSeriesUrl).ConfigureAwait(false);

            //Parse the Html document to get List of Series
            return(_parseHtml.GetList(doc, BaseType.Serie));
        }
示例#2
0
        public void ParseList()
        {
            List <BaseModel> _parseListResult = new List <BaseModel>();

            _parseListResult.Add(new BaseModel()
            {
                Name = "This is List item 1", Url = "item1.com"
            });
            _parseListResult.Add(new BaseModel()
            {
                Name = "This is List item 2", Url = "item2.com"
            });
            _parseListResult.Add(new BaseModel()
            {
                Name = "This is List item 3", Url = "item3.com"
            });
            _parseListResult.Add(new BaseModel()
            {
                Name = "This is List item 4", Url = "item4.com"
            });

            var result = _objParse.GetList(_html.ToString(), BaseType.Serie);

            Assert.AreEqual(_parseListResult, result);
        }