public void Collections_Set_Add() { var item1 = CreateItem1(); var item2 = CreateItem2(); Assert.IsTrue(WriteSet.Add(item1)); Assert.IsTrue(WriteSet.Add(item2)); Assert.IsFalse(WriteSet.Add(item1)); ReadSet.AssertContainsOnly(item1, item2); }
public void Collections_Set_IntersectWith() { var item1 = CreateItem1(); var item2 = CreateItem2(); var item3 = CreateItem3(); var list = new List <T>() { item2, item3 }; WriteSet.Add(item1); WriteSet.Add(item2); WriteSet.IntersectWith(list); ReadSet.AssertContainsOnly(item2); WriteSet.IntersectWith(ReadSet); ReadSet.AssertContainsOnly(item2); }
public void Collections_Set_SymmetricExceptWith() { var item1 = CreateItem1(); var item2 = CreateItem2(); var item3 = CreateItem3(); var list = new List <T>() { item2, item3 }; WriteSet.Add(item1); WriteSet.Add(item2); WriteSet.SymmetricExceptWith(list); ReadSet.AssertContainsOnly(item1, item3); WriteSet.SymmetricExceptWith(WriteSet); ReadSet.AssertEmpty(); }