public Remove ( |
||
value | ||
return | void |
public void Constructor0_Deny_Unrestricted () { CodeCatchClauseCollection coll = new CodeCatchClauseCollection (); Assert.AreEqual (0, coll.Add (ccc), "Add"); Assert.AreSame (ccc, coll[0], "this[int]"); coll.CopyTo (array, 0); coll.AddRange (array); coll.AddRange (coll); Assert.IsTrue (coll.Contains (ccc), "Contains"); Assert.AreEqual (0, coll.IndexOf (ccc), "IndexOf"); coll.Insert (0, ccc); coll.Remove (ccc); }
public void Remove_Null () { CodeCatchClauseCollection coll = new CodeCatchClauseCollection (); coll.Remove ((CodeCatchClause) null); }
public void Remove_NotInCollection () { CodeCatchClauseCollection coll = new CodeCatchClauseCollection (); coll.Remove (new CodeCatchClause ()); }
public void Remove () { CodeCatchClause ccc1 = new CodeCatchClause (); CodeCatchClause ccc2 = new CodeCatchClause (); CodeCatchClauseCollection coll = new CodeCatchClauseCollection (); coll.Add (ccc1); coll.Add (ccc2); Assert.AreEqual (2, coll.Count, "#1"); Assert.AreEqual (0, coll.IndexOf (ccc1), "#2"); Assert.AreEqual (1, coll.IndexOf (ccc2), "#3"); coll.Remove (ccc1); Assert.AreEqual (1, coll.Count, "#4"); Assert.AreEqual (-1, coll.IndexOf (ccc1), "#5"); Assert.AreEqual (0, coll.IndexOf (ccc2), "#6"); }