Exemplo n.º 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"));
        }
Exemplo n.º 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"));
        }
Exemplo n.º 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);
        }
Exemplo n.º 4
0
        public void remove_throws_if_read_only()
        {
            var record = new ConcreteRecordBase(true, "one");

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

            Assert.Throws <ArgumentNullException>(() => record.Remove(null));
        }
Exemplo n.º 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);
        }
Exemplo n.º 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"));
 }
Exemplo n.º 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"));
 }
Exemplo n.º 9
0
 public void remove_throws_if_value_is_null()
 {
     var record = new ConcreteRecordBase();
     Assert.Throws<ArgumentNullException>(() => record.Remove(null));
 }
Exemplo n.º 10
0
 public void remove_throws_if_read_only()
 {
     var record = new ConcreteRecordBase(true, "one");
     Assert.Throws<NotSupportedException>(() => record.Remove("one"));
 }