#region ========================================================================= USING ===================================================================================== using Nemera.Contracts.Responses.Common; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Text.Json; #endregion namespace Nemera.Contracts.UnitTests.Responses.Common; /// /// Contains unit tests for the record. /// [ExcludeFromCodeCoverage] public class PaginatedResponseTests { private readonly JsonSerializerOptions _jsonOptions = new() { PropertyNameCaseInsensitive = true }; [Fact] public void Deserialize_WhenDataIsMissing_ShouldThrowJsonException() { // Arrange string json = """{ "currentPage": 1, "perPage": 10, "count": 0, "numberOfPages": 0 }"""; // Act & Assert Assert.Throws(() => JsonSerializer.Deserialize>(json, _jsonOptions)); } }