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

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