public void Should_Map_DLive_Streams_To_Streams() { var streams = dliveStreamMapper.Map(streamSearchResults, pageSize, pageOffset); Assert.AreEqual(streams.Streams.First().StreamTitle, "test stream"); Assert.AreEqual(streams.Streams.First().StreamerName, "TestUserA"); Assert.AreEqual(streams.Streams.First().StreamThumbnailUrl, "http://thunmbnail.url"); Assert.AreEqual(streams.Streams.First().StreamerAvatarUrl, "http://avatar.url"); Assert.AreEqual(streams.Streams.First().StreamUrl, "dlive.url/TestUserA"); Assert.AreEqual(streams.Streams.First().Views, 1); Assert.AreEqual(streams.Streams.First().IsLive, true); Assert.AreEqual(streams.StreamPlatformName, StreamPlatform.DLive); }
public async Task <PlatformStreamsDto> GetLiveStreams(StreamFilterOptions filterOptions, int pageSize, PageToken pageToken) { if (!AreFilterOptionsSupported(filterOptions)) { throw new ArgumentException("The Dlive platform does not support these filter options"); } ; var liveStreamsResult = await dliveApi.GetLiveStreams(pageSize, pageToken, StreamSortOrder.Trending); return(streamMapper.Map(liveStreamsResult, pageSize, pageToken)); }