public void Collections_Set_Remove() { var item1 = CreateItem1(); var item2 = CreateItem2(); WriteSet.Add(item1); Assert.IsFalse(WriteSet.Remove(item2)); Assert.IsTrue(WriteSet.Remove(item1)); ReadSet.AssertEmpty(); }
public void Collections_Set_ExceptWith() { var item1 = CreateItem1(); var item2 = CreateItem2(); var item3 = CreateItem3(); var list = new List <T>() { item2, item3 }; WriteSet.Add(item1); WriteSet.Add(item2); WriteSet.ExceptWith(list); ReadSet.AssertContainsOnly(item1); WriteSet.ExceptWith(WriteSet); ReadSet.AssertEmpty(); }