24 lines
875 B
C#
24 lines
875 B
C#
using System;
|
|
using Xunit;
|
|
|
|
namespace Prophet.CoopWithDsh.Tests
|
|
{
|
|
public sealed class SnapshotModelTests
|
|
{
|
|
[Fact]
|
|
public void CreateDeduplicatesPathsAndPreservesDirtyState()
|
|
{
|
|
var snapshot = SnapshotModel.Create("one", 10, "F:\\Project\\App.sln", new[] {
|
|
new OpenDocument { Path = "F:\\Project\\main.cs", Label = "main.cs", Dirty = false },
|
|
new OpenDocument { Path = "f:\\project\\MAIN.cs", Label = "MAIN.cs", Dirty = true },
|
|
}, new DateTimeOffset(2026, 1, 1, 0, 0, 0, TimeSpan.Zero));
|
|
|
|
Assert.Equal(1, snapshot.Version);
|
|
Assert.Equal("visualstudio", snapshot.Ide);
|
|
Assert.Single(snapshot.Documents);
|
|
Assert.True(snapshot.Documents[0].Dirty);
|
|
Assert.Equal("2026-01-01T00:00:00.0000000Z", snapshot.UpdatedAt);
|
|
}
|
|
}
|
|
}
|