public void GetLastFMListeningHistoryWithAfterParam_CorrectListeningHistoryReturned() { sut = MakeSut(); var after = DateTime.UtcNow.AddDays(-1); var listeningHistoryTask = sut.GetLastFMRecentlyPlayed("RD", after); listeningHistoryTask.Result.Value.Should().NotBeNull(); listeningHistoryTask.Result.Value.Should().NotBe(string.Empty); PageResponse <LastTrack> actualPageResponse = (PageResponse <LastTrack>)listeningHistoryTask.Result.Value; actualPageResponse.Content.Should().NotBeEmpty(); actualPageResponse.Content.Should().HaveCount(1); actualPageResponse.Content[0].Should().BeOfType <LastTrack>(); }
public void GetLastFMListeniningHistory_ListeningHistoryReturned() { sut = MakeSut(); var listeningHistoryTask = sut.GetLastFMRecentlyPlayed("RD"); listeningHistoryTask.Result.Value.Should().NotBeNull(); listeningHistoryTask.Result.Value.Should().NotBe(string.Empty); PageResponse <LastTrack> actualPageResponse = (PageResponse <LastTrack>)listeningHistoryTask.Result.Value; actualPageResponse.Content.Should().NotBeEmpty(); actualPageResponse.Content.Should().HaveCount(2); actualPageResponse.Content[0].Duration.Should().Be(new TimeSpan(0, 2, 30)); actualPageResponse.Content[0].Should().BeOfType <LastTrack>(); }