diff --git a/tools/PlaybackService/src/Controllers/KeyDeliverController.cs b/tools/PlaybackService/src/Controllers/KeyDeliverController.cs index e57d01b..c1f52e9 100644 --- a/tools/PlaybackService/src/Controllers/KeyDeliverController.cs +++ b/tools/PlaybackService/src/Controllers/KeyDeliverController.cs @@ -113,7 +113,7 @@ public async Task PostAsync([FromBody] KeyRequest keyRequest, var key = t.Item2; logger.LogDebug($"Get key for kid {kid} " + (key != null ? "success" : "failed")); return key != null; - }).Select(t => new ClearKey() { KeyId = ToDashKeyOrKeyId(t.Item1), Key = ToDashKeyOrKeyId(t.Item2) }).ToArray(); + }).Select(t => new ClearKey() { KeyId = ToDashKeyOrKeyId(t.Item1), Key = ToDashKeyOrKeyId(t.Item2!) }).ToArray(); // All done. var result = new JsonResult(new KeyRequestResponse() diff --git a/tools/PlaybackService/src/Middlewares/ContentTypeInjestionForShakaPlayer.cs b/tools/PlaybackService/src/Middlewares/ContentTypeInjectionForShakaPlayer.cs similarity index 100% rename from tools/PlaybackService/src/Middlewares/ContentTypeInjestionForShakaPlayer.cs rename to tools/PlaybackService/src/Middlewares/ContentTypeInjectionForShakaPlayer.cs diff --git a/tools/PlaybackService/test/KeyDeliverControllerTest.cs b/tools/PlaybackService/test/KeyDeliverControllerTest.cs index 882b00a..74b798a 100644 --- a/tools/PlaybackService/test/KeyDeliverControllerTest.cs +++ b/tools/PlaybackService/test/KeyDeliverControllerTest.cs @@ -31,8 +31,8 @@ public async Task ClearKeyShouldBeDeliveredForHlsKeyRequest() using var output = new MemoryStream(); string? contentType = null; long? contentLength = null; - httpResponseMock.SetupSet(c => c.ContentType).Callback(c => contentType = c); - httpResponseMock.SetupSet(c => c.ContentLength).Callback(c => contentLength = c); + httpResponseMock.SetupSet(c => c.ContentType = It.IsAny()).Callback(c => contentType = c); + httpResponseMock.SetupSet(c => c.ContentLength = It.IsAny()).Callback(c => contentLength = c); httpResponseMock.Setup(c => c.Body).Returns(output); // Create controller. diff --git a/tools/PlaybackService/test/PlaybackControllerTest.cs b/tools/PlaybackService/test/PlaybackControllerTest.cs index 10774be..cbd1524 100644 --- a/tools/PlaybackService/test/PlaybackControllerTest.cs +++ b/tools/PlaybackService/test/PlaybackControllerTest.cs @@ -26,7 +26,7 @@ public async Task DashManifestShouldBeInjected() // Hook HttpResponseMock. using var output = new MemoryStream(); string? contentType = null; - httpResponseMock.SetupSet(c => c.ContentType).Callback(c => contentType = c); + httpResponseMock.SetupSet(c => c.ContentType = It.IsAny()).Callback(c => contentType = c); httpResponseMock.Setup(c => c.Body).Returns(output); // Create controller @@ -67,7 +67,7 @@ public async Task HlsManifestShouldBeInjected() // Hook HttpResponseMock. using var output = new MemoryStream(); string? contentType = null; - httpResponseMock.SetupSet(c => c.ContentType).Callback(c => contentType = c); + httpResponseMock.SetupSet(c => c.ContentType = It.IsAny()).Callback(c => contentType = c); httpResponseMock.Setup(c => c.Body).Returns(output); // Create controller