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); }
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); }
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); }