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