Radicade Public Code

This commit is contained in:
JogmansonReal
2026-10-16 23:33:13 -07:00
commit 55175acdf6
832 changed files with 363261 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
using System.Text.Json;
using Microsoft.AspNetCore.Mvc;
using RadicadeServer.API.Notifications;
using Xunit;
namespace RadicadeServer.Tests;
public class PlatformNotificationsTests
{
[Fact]
public void CategoriesReturnsCountedObjectForClientDeserializer()
{
var response = Assert.IsType<OkObjectResult>(new PlatformNotificationsAPI().GetCategories());
var json = JsonSerializer.SerializeToElement(response.Value);
Assert.Equal(JsonValueKind.Object, json.ValueKind);
var results = json.GetProperty("Results");
Assert.Equal(JsonValueKind.Array, results.ValueKind);
Assert.Equal(results.GetArrayLength(), json.GetProperty("TotalResults").GetInt64());
}
}