public async Task HandleResponseSingle() { var expectedTags = new List <LastTag> { new LastTag("the fate of the world is safe in crystal castles", "http://www.last.fm/tag/the%20fate%20of%20the%20world%20is%20safe%20in%20crystal%20castles") }; var response = CreateResponseMessage(Encoding.UTF8.GetString(ArtistApiResponses.ArtistGetTagsSingle)); var parsed = await _command.HandleResponse(response); var expectedJson = expectedTags.TestSerialise(); var actualJson = parsed.Content.TestSerialise(); parsed.AssertValues(true, 1, 1, 1, 1); Assert.AreEqual(expectedJson, actualJson, expectedJson.DifferencesTo(actualJson)); }
public async Task HandleResponseSingle() { var expectedTags = new List <LastTag> { new LastTag("Test Tag", "http://www.last.fm/tag/test%20tag") }; var response = CreateResponseMessage(Encoding.UTF8.GetString(AlbumApiResponses.AlbumGetTagsSingle)); var parsed = await _command.HandleResponse(response); var expectedJson = expectedTags.TestSerialise(); var actualJson = parsed.Content.TestSerialise(); parsed.AssertValues(true, 1, 1, 1, 1); Assert.AreEqual(expectedJson, actualJson, expectedJson.DifferencesTo(actualJson)); }