Exemplo n.º 1
0
        [InlineData(90000, ">24 hrs")] // 25 hours
        public void RoundedDiffTests(double diffInSeconds, string expectedResult)
        {
            TimeSpan diff   = TimeSpan.FromSeconds(diffInSeconds);
            var      result = PlayerTelemetryTracker.GetRoundedDiff(diff);

            Assert.Equal(expectedResult, result);
        }
Exemplo n.º 2
0
        public void TrackDurationTest()
        {
            var playerMock    = new Mock <IMixMediaPlayerService>();
            var telemetryMock = new Mock <ITelemetry>();

            var    tracker = new PlayerTelemetryTracker(playerMock.Object, telemetryMock.Object);
            string result  = tracker.TrackDuration(DateTimeOffset.Now);

            Assert.Equal(string.Empty, result);
        }