Esempio n. 1
0
 public void TestRemove()
 {
     serverSyncList.Remove("World");
     SerializeHelper.SerializeDeltaTo(serverSyncList, clientSyncList);
     Assert.That(clientSyncList, Is.EquivalentTo(new[] { "Hello", "!" }));
 }
Esempio n. 2
0
 public void TestInsertRange()
 {
     serverSyncList.InsertRange(1, new[] { "One", "Two", "Three" });
     SerializeHelper.SerializeDeltaTo(serverSyncList, clientSyncList);
     Assert.That(clientSyncList, Is.EqualTo(new[] { "Hello", "One", "Two", "Three", "World", "!" }));
 }
Esempio n. 3
0
 public void TestRemoveAll()
 {
     serverSyncList.RemoveAll(entry => entry.Contains("l"));
     SerializeHelper.SerializeDeltaTo(serverSyncList, clientSyncList);
     Assert.That(clientSyncList, Is.EquivalentTo(new[] { "!" }));
 }
Esempio n. 4
0
 public void TestClear()
 {
     serverSyncList.Clear();
     SerializeHelper.SerializeDeltaTo(serverSyncList, clientSyncList);
     Assert.That(clientSyncList, Is.EquivalentTo(new string[] { }));
 }
Esempio n. 5
0
 public void TestInsert()
 {
     serverSyncList.Insert(0, "yay");
     SerializeHelper.SerializeDeltaTo(serverSyncList, clientSyncList);
     Assert.That(clientSyncList, Is.EquivalentTo(new[] { "yay", "Hello", "World", "!" }));
 }
Esempio n. 6
0
 public void TestUnionWithSelf()
 {
     serverSyncSet.UnionWith(serverSyncSet);
     SerializeHelper.SerializeDeltaTo(serverSyncSet, clientSyncSet);
     Assert.That(clientSyncSet, Is.EquivalentTo(new[] { "World", "Hello", "!" }));
 }
Esempio n. 7
0
 public void TestSymmetricExceptWithSelf()
 {
     serverSyncSet.SymmetricExceptWith(serverSyncSet);
     SerializeHelper.SerializeDeltaTo(serverSyncSet, clientSyncSet);
     Assert.That(clientSyncSet, Is.EquivalentTo(new string[] { }));
 }
Esempio n. 8
0
 public void TestIntersectWith()
 {
     serverSyncSet.IntersectWith(new[] { "World", "Hello" });
     SerializeHelper.SerializeDeltaTo(serverSyncSet, clientSyncSet);
     Assert.That(clientSyncSet, Is.EquivalentTo(new[] { "World", "Hello" }));
 }
Esempio n. 9
0
 public void TestClear()
 {
     serverSyncDictionary.Clear();
     SerializeHelper.SerializeDeltaTo(serverSyncDictionary, clientSyncDictionary);
     Assert.That(serverSyncDictionary, Is.EquivalentTo(new SyncDictionaryIntString()));
 }
Esempio n. 10
0
 public void TestRemove()
 {
     serverSyncDictionary.Remove(1);
     SerializeHelper.SerializeDeltaTo(serverSyncDictionary, clientSyncDictionary);
     Assert.That(!clientSyncDictionary.ContainsKey(1));
 }