public void Should_Return_Back_Nothing_When_No_Matching_Channel_Was_Found()
        {
            var channels = new List <TwitchChannelDto> {
                anotherChannel
            };
            var channelResults = MaybeResult <IEnumerable <TwitchChannelDto>, StreamProviderError> .Success(channels);

            var channel = TwitchChannelSelector.Select(expectedChannel.display_name, channelResults);

            Assert.IsTrue(channel.IsNothing);
        }
        public void Should_Return_Back_The_Matching_Channel()
        {
            var channels = new List <TwitchChannelDto> {
                expectedChannel, anotherChannel
            };
            var channelResults = MaybeResult <IEnumerable <TwitchChannelDto>, StreamProviderError> .Success(channels);

            var channel = TwitchChannelSelector.Select(expectedChannel.display_name, channelResults);

            Assert.AreEqual(channel.GetOrElse(new TwitchChannelDto()), expectedChannel);
        }
        public async Task <MaybeResult <PlatformChannelDto, StreamProviderError> > GetStreamerChannel(string channelName)
        {
            var channelsResult = await twitchStreamApi.SearchChannels(channelName, 1, 0);

            return(channelMapper.Map(TwitchChannelSelector.Select(channelName, channelsResult)));
        }