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,25 @@
// <copyright file="HlcTimestampTests.Now.cs" company="StellaOps">
// Copyright (c) StellaOps. Licensed under BUSL-1.1.
// </copyright>
using FluentAssertions;
using Microsoft.Extensions.Time.Testing;
using System;
using Xunit;
namespace StellaOps.HybridLogicalClock.Tests;
public sealed partial class HlcTimestampTests
{
[Fact]
public void Now_UsesTimeProviderAndSetsNodeId()
{
var fixedTime = new DateTimeOffset(2024, 1, 1, 0, 0, 0, TimeSpan.Zero);
var timeProvider = new FakeTimeProvider(fixedTime);
var timestamp = HlcTimestamp.Now("node-1", timeProvider);
timestamp.PhysicalTime.Should().Be(fixedTime.ToUnixTimeMilliseconds());
timestamp.NodeId.Should().Be("node-1");
timestamp.LogicalCounter.Should().Be(0);
}
}