public void RetainAll()
 {
     Assert.Throws <NotSupportedException>(() => Set.RetainAll(new object[] { 1, 9 }));
 }
 public void Clear()
 {
     Assert.Throws <NotSupportedException>(() => Set.Clear());
 }
 public void Remove()
 {
     Assert.Throws <NotSupportedException>(() => Set.Remove(1));
 }
 public void RemoveAll()
 {
     object[] removed = new object[] { 1, 3 };
     Assert.Throws <NotSupportedException>(() => Set.RemoveAll(removed));
 }
 public void AddAll()
 {
     Assert.Throws <NotSupportedException>(() => Set.AddAll(new int[] { 4, 5, 6 }));
 }
 public void Add()
 {
     Assert.Throws <NotSupportedException>(() => Set.Add(1));
 }
        public void ClonedInstanceMustStillBeImmutable()
        {
            ISet clone = (ISet)Set.Clone();

            Assert.Throws <NotSupportedException>(() => clone.Add("bad chair, bad chair"));
        }
 public void ContainsAll()
 {
     Assert.IsFalse(Set.ContainsAll(new object[] { "Funk", 1, 2, 3 }));
     Assert.IsTrue(Set.ContainsAll(new object[] { 1, 3, 2 }));
 }
 public void Contains()
 {
     Assert.IsFalse(Set.Contains("Funk"));
     Assert.IsTrue(Set.Contains(1));
 }