diff options
| author | Cody Robibero <cody@robibe.ro> | 2022-08-14 11:20:01 -0600 |
|---|---|---|
| committer | Cody Robibero <cody@robibe.ro> | 2022-09-09 07:44:14 -0600 |
| commit | 6004060b4ea6e68280c5d2e28799bb91fbc4f38e (patch) | |
| tree | 3bb63160c9851f0a677fca2bcb78ab6a7e5d9780 /tests/Jellyfin.Api.Tests/ModelBinders/CommaDelimitedArrayModelBinderTests.cs | |
| parent | 62ef93e2cebd9dd4318808e93ad4bf64b8ec89a6 (diff) | |
Fix build errors from new warnings
Diffstat (limited to 'tests/Jellyfin.Api.Tests/ModelBinders/CommaDelimitedArrayModelBinderTests.cs')
| -rw-r--r-- | tests/Jellyfin.Api.Tests/ModelBinders/CommaDelimitedArrayModelBinderTests.cs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/Jellyfin.Api.Tests/ModelBinders/CommaDelimitedArrayModelBinderTests.cs b/tests/Jellyfin.Api.Tests/ModelBinders/CommaDelimitedArrayModelBinderTests.cs index 3ae6ae5bd..e37c9d91f 100644 --- a/tests/Jellyfin.Api.Tests/ModelBinders/CommaDelimitedArrayModelBinderTests.cs +++ b/tests/Jellyfin.Api.Tests/ModelBinders/CommaDelimitedArrayModelBinderTests.cs @@ -192,7 +192,9 @@ namespace Jellyfin.Api.Tests.ModelBinders await modelBinder.BindModelAsync(bindingContextMock.Object); Assert.True(bindingContextMock.Object.Result.IsModelSet); - Assert.Empty((IReadOnlyList<TestType>?)bindingContextMock.Object.Result.Model); + var listResult = (IReadOnlyList<TestType>?)bindingContextMock.Object.Result.Model; + Assert.NotNull(listResult); + Assert.Empty(listResult); } [Fact] @@ -220,7 +222,9 @@ namespace Jellyfin.Api.Tests.ModelBinders await modelBinder.BindModelAsync(bindingContextMock.Object); Assert.True(bindingContextMock.Object.Result.IsModelSet); - Assert.Single((IReadOnlyList<TestType>?)bindingContextMock.Object.Result.Model); + var listResult = (IReadOnlyList<TestType>?)bindingContextMock.Object.Result.Model; + Assert.NotNull(listResult); + Assert.Single(listResult); } } } |
