private static async Task <List <string> > GetSingles(Artist model, IBLService _blService, List <string> singles, HttpClient httpClient1) { using (var response = await httpClient1.GetAsync("?query=artist:" + model.ArtistName)) { var responseData1 = await response.Content.ReadAsStringAsync(); //Add song titles to the list singles = _blService.GetTitles(responseData1); } return(singles); }
public void GetTitle_Test() { //Arrange string strDetails = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><metadata><release-list><release><title>My Song</title></release></release-list></metadata>"; List <string> expected = new List <string>(); List <string> actual = new List <string>(); IBLService bLService = BLServiceFactory.GetBLServiceObj(); //Act expected.Add("My Song"); actual = bLService.GetTitles(strDetails); //Assert Assert.AreEqual(expected.Count, actual.Count); }