Ejemplo n.º 1
0
        public void NongenericContains_WrongItemType_ReturnsFalse()
        {
            var list = new List <int>(new[] { 1, 2 }) as IList;

            Assert.False(list.Contains(this));

            var deque = new Deque <int>(new[] { 1, 2 }) as IList;

            Assert.False(deque.Contains(this));
        }
Ejemplo n.º 2
0
        public void NongenericContains_ItemNotPresent_ReturnsFalse()
        {
            var deque = new Deque <int>(new[] { 1, 2 }) as IList;

            Assert.False(deque.Contains(3));
        }
Ejemplo n.º 3
0
        public void NongenericContains_ItemPresent_ReturnsTrue()
        {
            var deque = new Deque <int>(new[] { 1, 2 }) as IList;

            Assert.True(deque.Contains(2));
        }
Ejemplo n.º 4
0
        public void Contains_ItemNotPresent_ReturnsFalse()
        {
            var deque = new Deque <int>(new[] { 1, 2 }) as ICollection <int>;

            Assert.False(deque.Contains(3));
        }
Ejemplo n.º 5
0
        public void Contains_ItemPresent_ReturnsTrue()
        {
            var deque = new Deque <int>(new[] { 1, 2 }) as ICollection <int>;

            Assert.True(deque.Contains(2));
        }