Unify CCS case management flow

This commit is contained in:
hz
2026-07-19 21:29:24 -05:00
parent dacf2b89b2
commit f12904bf73
13 changed files with 938 additions and 47 deletions
+15
View File
@@ -1,12 +1,27 @@
using QuestionsApi.Models;
using QuestionsApi.Services;
using System.Text.Json;
using MongoDB.Bson;
using Xunit;
namespace QuestionsApi.Tests;
public sealed class CcsCaseTests
{
[Fact]
public void CcsHistoryCursorRoundTripsTimestampAndId()
{
var createdUtc = new DateTime(2026, 7, 19, 12, 34, 56, DateTimeKind.Utc);
var id = ObjectId.GenerateNewId().ToString();
var encoded = CcsStore.EncodeHistoryCursor(createdUtc, id);
Assert.True(CcsStore.TryDecodeHistoryCursor(encoded, out var decoded));
Assert.Equal(createdUtc, decoded!.CreatedUtc);
Assert.Equal(id, decoded.Id);
Assert.False(CcsStore.TryDecodeHistoryCursor("not-a-cursor", out _));
}
[Fact]
public void AppFeedbackValidationAcceptsSafeDiagnostics()
{