stabilizaiton work - projects rework for maintenanceability and ui livening

This commit is contained in:
master
2026-02-03 23:40:04 +02:00
parent 074ce117ba
commit 557feefdc3
3305 changed files with 186813 additions and 107843 deletions

View File

@@ -0,0 +1,34 @@
// <copyright file="HlcTimestampTests.Mutation.cs" company="StellaOps">
// Copyright (c) StellaOps. Licensed under BUSL-1.1.
// </copyright>
using FluentAssertions;
using Xunit;
namespace StellaOps.HybridLogicalClock.Tests;
public sealed partial class HlcTimestampTests
{
[Fact]
public void Increment_IncreasesLogicalCounter()
{
var original = CreateTimestamp(1000, "node1", 4);
var incremented = original.Increment();
incremented.PhysicalTime.Should().Be(original.PhysicalTime);
incremented.NodeId.Should().Be(original.NodeId);
incremented.LogicalCounter.Should().Be(5);
}
[Fact]
public void WithPhysicalTime_ResetsCounter()
{
var original = CreateTimestamp(1000, "node1", 4);
var updated = original.WithPhysicalTime(2000);
updated.PhysicalTime.Should().Be(2000);
updated.NodeId.Should().Be("node1");
updated.LogicalCounter.Should().Be(0);
}
}