Example #1
0
 public TwitchService(IConfiguration config, ILoggerFactory loggerFactory, Fritz.Twitch.Proxy proxy, Fritz.Twitch.ChatClient chatClient)
 {
     this.Configuration = config;
     this.Logger        = loggerFactory.CreateLogger("StreamServices");
     this.Proxy         = proxy;
     this._ChatClient   = chatClient;
 }
Example #2
0
        public async Task ShouldReturnNonZeroCount()
        {
            // Arrange
            var sut = new Fritz.Twitch.Proxy(_Client, _Settings, Logger);

            // Act
            var followerCount = await sut.GetFollowerCountAsync();

            Output.WriteLine($"csharpfritz Twitch follower count: {followerCount}");

            // Assert
            Assert.NotEqual(0, followerCount);
        }
        public async Task ShouldReturnZeroWhenNotStreaming()
        {
            // Arrange
            var sut = new Fritz.Twitch.Proxy(_Client, _Settings, Logger);

            // Act
            var viewerCount = await sut.GetViewerCountAsync();

            Output.WriteLine($"csharpfritz Twitch viewer count: {viewerCount}");

            // Assert
            Assert.Equal(0, viewerCount);
        }