feat: add DSH IDE open-file references
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user