Exemplo n.º 1
0
        public void contains_returns_true_if_value_is_in_record()
        {
            var record = new ConcreteRecordBase("one", "two");

            Assert.True(record.Contains("one"));
            Assert.True(record.Contains("two"));
        }
Exemplo n.º 2
0
        public void contains_returns_false_if_value_is_not_in_record()
        {
            var record = new ConcreteRecordBase("one", "two");

            Assert.False(record.Contains("three"));
            Assert.False(record.Contains("ONE"));
            Assert.False(record.Contains("Two"));
        }
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 add_adds_specified_value()
        {
            var record = new ConcreteRecordBase();

            record.Add("one");
            Assert.Equal(1, record.Count);
            Assert.True(record.Contains("one"));

            record.Add("two");
            Assert.Equal(2, record.Count);
            Assert.True(record.Contains("two"));
        }
Exemplo n.º 5
0
        public void contains_throws_if_value_is_null()
        {
            var record = new ConcreteRecordBase();

            Assert.Throws <ArgumentNullException>(() => record.Contains(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 add_adds_specified_value()
        {
            var record = new ConcreteRecordBase();

            record.Add("one");
            Assert.Equal(1, record.Count);
            Assert.True(record.Contains("one"));

            record.Add("two");
            Assert.Equal(2, record.Count);
            Assert.True(record.Contains("two"));
        }
Exemplo n.º 8
0
 public void contains_returns_true_if_value_is_in_record()
 {
     var record = new ConcreteRecordBase("one", "two");
     Assert.True(record.Contains("one"));
     Assert.True(record.Contains("two"));
 }
Exemplo n.º 9
0
 public void contains_returns_false_if_value_is_not_in_record()
 {
     var record = new ConcreteRecordBase("one", "two");
     Assert.False(record.Contains("three"));
     Assert.False(record.Contains("ONE"));
     Assert.False(record.Contains("Two"));
 }
Exemplo n.º 10
0
 public void contains_throws_if_value_is_null()
 {
     var record = new ConcreteRecordBase();
     Assert.Throws<ArgumentNullException>(() => record.Contains(null));
 }