예제 #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"));
 }