Exemple #1
0
        public void NongenericIsSynchronized_IsFalse()
        {
            var deque = new Deque <int>() as IList;

            Assert.False(deque.IsSynchronized);
        }
Exemple #2
0
        public void NongenericIsReadOnly_ReturnsFalse()
        {
            var deque = new Deque <int>() as IList;

            Assert.False(deque.IsReadOnly);
        }
Exemple #3
0
        public void NongenericIsFixedSize_IsFalse()
        {
            var deque = new Deque <int>() as IList;

            Assert.False(deque.IsFixedSize);
        }
Exemple #4
0
        public void NongenericContains_ItemPresent_ReturnsTrue()
        {
            var deque = new Deque <int>(new[] { 1, 2 }) as IList;

            Assert.True(deque.Contains(2));
        }
Exemple #5
0
        public void NongenericContains_ItemNotPresent_ReturnsFalse()
        {
            var deque = new Deque <int>(new[] { 1, 2 }) as IList;

            Assert.False(deque.Contains(3));
        }
Exemple #6
0
        public void Contains_ItemNotPresent_ReturnsFalse()
        {
            var deque = new Deque <int>(new[] { 1, 2 }) as ICollection <int>;

            Assert.False(deque.Contains(3));
        }
Exemple #7
0
        public void IsReadOnly_ReturnsFalse()
        {
            var deque = new Deque <int>();

            Assert.False(((ICollection <int>)deque).IsReadOnly);
        }
Exemple #8
0
        public void Contains_ItemPresent_ReturnsTrue()
        {
            var deque = new Deque <int>(new[] { 1, 2 }) as ICollection <int>;

            Assert.True(deque.Contains(2));
        }
Exemple #9
0
        public void Constructor_FromEmptySequence_UsesDefaultCapacity()
        {
            var deque = new Deque <int>(new int[] { });

            Assert.AreEqual(DefaultCapacity, deque.Capacity);
        }
Exemple #10
0
        public void Constructor_CapacityOf1_UsesSpecifiedCapacity()
        {
            var deque = new Deque <int>(1);

            Assert.AreEqual(1, deque.Capacity);
        }
Exemple #11
0
        public void Constructor_WithoutExplicitCapacity_UsesDefaultCapacity()
        {
            var deque = new Deque <int>();

            Assert.AreEqual(DefaultCapacity, deque.Capacity);
        }
Exemple #12
0
        public void NongenericSyncRoot_IsSelf()
        {
            var deque = new Deque <int>() as IList;

            Assert.AreSame(deque, deque.SyncRoot);
        }