CultNet tests: a snapshot that swaps unique-index values against the replica is applied
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
3a5df75a07
commit
2a23efebee
1 changed files with 11 additions and 0 deletions
|
|
@ -302,5 +302,16 @@ namespace GameCult.Networking.Tests
|
|||
Assert.That(lone.CommitCount, Is.Null);
|
||||
Assert.That(commits[0].Id, Is.Not.EqualTo(commits[1].Id));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ASnapshotThatSwapsIndexValuesAgainstWhatTheReplicaHoldsIsApplied()
|
||||
{
|
||||
using var run = new Replication(
|
||||
source => Stage(source, ("a", "two"), ("b", "one")),
|
||||
replica => Stage(replica, ("a", "one"), ("b", "two")));
|
||||
|
||||
Assert.That(run.ReplicaItem("a")!.Sku, Is.EqualTo("two"));
|
||||
Assert.That(run.ReplicaItem("b")!.Sku, Is.EqualTo("one"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue