So both pageResponse.TotalItems and pageResponse.Content.Count are compared to the input parameter totalItems.
From my understanding the pageResponse.TotalItems is the same as the "total" attribute in the Lastfm response. The pageResponse.Content.Count should be similar to Lastfm responses "perPage" attribute.
An example from Last.fm. Calling the Artist.GetTopAlbums like this:
/?method=artist.gettopalbums&artist=steely+dan&api_key={{apikey}}&format=json
I think it would be more correct to change the assert on pageResponse.Content.Count to:
Assert.IsTrue(pageResponse.Content.Count == pageSize, testMessage("content length", pageSize));
The AssertValues-method compares a number of values from the page response to expected values. Among the assertions being tested are these:
So both pageResponse.TotalItems and pageResponse.Content.Count are compared to the input parameter totalItems.
From my understanding the pageResponse.TotalItems is the same as the "total" attribute in the Lastfm response. The pageResponse.Content.Count should be similar to Lastfm responses "perPage" attribute.
An example from Last.fm. Calling the Artist.GetTopAlbums like this: /?method=artist.gettopalbums&artist=steely+dan&api_key={{apikey}}&format=json
Results in page attributes as follows:
I think it would be more correct to change the assert on pageResponse.Content.Count to:
Assert.IsTrue(pageResponse.Content.Count == pageSize, testMessage("content length", pageSize));
Or am I missing something here? :)