Unify CCS case management flow
This commit is contained in:
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user