public void RO_Add()
        {
            CommaDelimitedStringCollection c = new CommaDelimitedStringCollection();

            c.SetReadOnly();
            Assert.Throws <ConfigurationErrorsException>(() => c.Add("hi"));
        }
        public void RO_Remove()
        {
            CommaDelimitedStringCollection c = new CommaDelimitedStringCollection();

            c.SetReadOnly();
            Assert.Throws <ConfigurationErrorsException>(() => c.Clear());
        }
Пример #3
0
        public void RO_Add()
        {
            CommaDelimitedStringCollection c = new CommaDelimitedStringCollection();

            c.SetReadOnly();
            c.Add("hi");
        }
Пример #4
0
        public void RO_Remove()
        {
            CommaDelimitedStringCollection c = new CommaDelimitedStringCollection();

            c.SetReadOnly();
            c.Clear();
        }
Пример #5
0
        public void RO_Insert()
        {
            CommaDelimitedStringCollection c = new CommaDelimitedStringCollection();

            c.Add("hi");
            c.SetReadOnly();
            c.Insert(0, "bye");
        }
        public void RO_AddRange()
        {
            CommaDelimitedStringCollection c = new CommaDelimitedStringCollection();

            string[] foo = new string[2];

            foo[0] = "hi";
            foo[1] = "bye";

            c.SetReadOnly();
            Assert.Throws <ConfigurationErrorsException>(() => c.AddRange(foo));
        }
Пример #7
0
        public void RO_AddRange()
        {
            CommaDelimitedStringCollection c = new CommaDelimitedStringCollection();

            string[] foo = new string[2];

            foo[0] = "hi";
            foo[1] = "bye";

            c.SetReadOnly();
            c.AddRange(foo);
        }