public void SymmetricExceptWithTest() { set.Add(1); set.Add(3); set.Add(8); set.SymmetricExceptWith(list); Assert.IsTrue(set.Contains(8)); Assert.IsFalse(set.Contains(3)); Assert.IsTrue(set.Contains(5)); }
public void SymmetricExceptIsCorrect() { var set = new MySet <int>() { 0, 2, 4, 5, 6, 8 }; var list = new List <int>() { 0, 1, 2, 3, 4, 6, 7, 8 }; set.SymmetricExceptWith(list); Assert.IsTrue(set.Contains(1)); Assert.IsTrue(set.Contains(3)); Assert.IsTrue(set.Contains(7)); Assert.IsFalse(set.Contains(0)); Assert.IsFalse(set.Contains(2)); Assert.IsFalse(set.Contains(8)); }