public void RO_Remove() { CommaDelimitedStringCollection c = new CommaDelimitedStringCollection(); c.SetReadOnly(); Assert.Throws <ConfigurationErrorsException>(() => c.Clear()); }
public void Manipulations() { CommaDelimitedStringCollection c = new CommaDelimitedStringCollection(); c.Add("1"); Assert.Equal("1", c.ToString()); c.Add("2"); c.Add("3"); Assert.Equal("1,2,3", c.ToString()); c.Remove("2"); Assert.Equal("1,3", c.ToString()); c.Insert(1, "2"); Assert.Equal("1,2,3", c.ToString()); c.Clear(); Assert.Null(c.ToString()); string[] foo = new string[3]; foo[0] = "1"; foo[1] = "2"; foo[2] = "3"; c.AddRange(foo); Assert.Equal("1,2,3", c.ToString()); }
public void RO_Remove() { CommaDelimitedStringCollection c = new CommaDelimitedStringCollection(); c.SetReadOnly(); c.Clear(); }