示例#1
0
        public void remove_returns_false_if_value_not_removed()
        {
            var record = new ConcreteRecordBase("one", "two", "three");

            Assert.False(record.Remove("four"));
            Assert.False(record.Remove("One"));
        }
示例#2
0
        public void remove_returns_true_if_value_is_removed()
        {
            var record = new ConcreteRecordBase("one", "two", "three");

            Assert.True(record.Remove("one"));
            Assert.True(record.Remove("two"));
            Assert.True(record.Remove("three"));
        }
示例#3
0
        public void remove_removes_value()
        {
            var record = new ConcreteRecordBase("one", "two", "three");

            Assert.True(record.Contains("one"));
            record.Remove("one");
            Assert.False(record.Contains("one"));
            Assert.Equal(2, record.Count);
        }
示例#4
0
        public void remove_throws_if_read_only()
        {
            var record = new ConcreteRecordBase(true, "one");

            Assert.Throws <NotSupportedException>(() => record.Remove("one"));
        }
示例#5
0
        public void remove_throws_if_value_is_null()
        {
            var record = new ConcreteRecordBase();

            Assert.Throws <ArgumentNullException>(() => record.Remove(null));
        }
示例#6
0
        public void remove_removes_value()
        {
            var record = new ConcreteRecordBase("one", "two", "three");

            Assert.True(record.Contains("one"));
            record.Remove("one");
            Assert.False(record.Contains("one"));
            Assert.Equal(2, record.Count);
        }
示例#7
0
 public void remove_returns_true_if_value_is_removed()
 {
     var record = new ConcreteRecordBase("one", "two", "three");
     Assert.True(record.Remove("one"));
     Assert.True(record.Remove("two"));
     Assert.True(record.Remove("three"));
 }
示例#8
0
 public void remove_returns_false_if_value_not_removed()
 {
     var record = new ConcreteRecordBase("one", "two", "three");
     Assert.False(record.Remove("four"));
     Assert.False(record.Remove("One"));
 }
示例#9
0
 public void remove_throws_if_value_is_null()
 {
     var record = new ConcreteRecordBase();
     Assert.Throws<ArgumentNullException>(() => record.Remove(null));
 }
示例#10
0
 public void remove_throws_if_read_only()
 {
     var record = new ConcreteRecordBase(true, "one");
     Assert.Throws<NotSupportedException>(() => record.Remove("one"));
 }