private void OnSuspension(object sender, SuspendingEventArgs e) { var deferral = e.SuspendingOperation.GetDeferral(); _playerTracker?.TrackDuration(DateTimeOffset.Now); deferral.Complete(); }
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); }