コード例 #1
0
ファイル: Sum.cs プロジェクト: rht341/Fritz.StreamTools
        public void CurrentFollowerCountHandlesMultipleServices(IStreamService jeffStreams, IStreamService otherStreamService)
        {
            // arrange

            // act
            var sut = new Fritz.StreamTools.Services.StreamService(new[] { jeffStreams, otherStreamService });
            var sum = sut.CurrentFollowerCount;

            // assert
            Assert.Equal(jeffStreams.CurrentFollowerCount + otherStreamService.CurrentFollowerCount, sum);
        }
コード例 #2
0
ファイル: Sum.cs プロジェクト: rht341/Fritz.StreamTools
        public void CurrentFollowerCountHandlesOneService(IStreamService jeffStreams)
        {
            // arrange

            // act
            var sut = new Fritz.StreamTools.Services.StreamService(new[] { jeffStreams });
            var sum = sut.CurrentFollowerCount;

            // assert
            Assert.Equal(jeffStreams.CurrentFollowerCount, sum);
        }
コード例 #3
0
        public void ShouldCountSeparately(IStreamService jeffStreams, IStreamService otherStreamService)
        {
            // arrange

            // act
            var sut   = new Fritz.StreamTools.Services.StreamService(new[] { jeffStreams, otherStreamService });
            var count = sut.ViewerCountByService.ToList();

            // assert
            Assert.Equal(2, count.Count());
            Assert.Equal(jeffStreams.CurrentViewerCount, count.First(c => c.service == jeffStreams.Name).count);
            Assert.Equal(otherStreamService.CurrentViewerCount, count.First(c => c.service == otherStreamService.Name).count);
        }