public void RemoveFromFront_WhenEmpty_IsRejected() { Deque <int> q = new Deque <int>(); q.RemoveFromFront(); }
public void NongenericSyncRoot_IsSelf() { var deque = new Deque <int>() as IList; Assert.Same(deque, deque.SyncRoot); }
public void Capacity_LessThanCount_IsRejected() { Deque <int> q = new Deque <int>(new[] { 1, 2, 3, 4, 5 }); q.Capacity = 4; }
public void NongenericIsFixedSize_IsFalse() { var deque = new Deque <int>() as IList; Assert.False(deque.IsFixedSize); }
public void NongenericIsSynchronized_IsFalse() { var deque = new Deque <int>() as IList; Assert.False(deque.IsSynchronized); }
public void NongenericContains_ItemNotPresent_ReturnsFalse() { var deque = new Deque <int>(new[] { 1, 2 }) as IList; Assert.False(deque.Contains(3)); }
public void NongenericIsReadOnly_ReturnsFalse() { var deque = new Deque <int>() as IList; Assert.False(deque.IsReadOnly); }
public void IsReadOnly_ReturnsFalse() { var deque = new Deque <int>(); Assert.False(((ICollection <int>)deque).IsReadOnly); }
public void NongenericContains_ItemPresent_ReturnsTrue() { var deque = new Deque <int>(new[] { 1, 2 }) as IList; Assert.True(deque.Contains(2)); }
public void Contains_ItemNotPresent_ReturnsFalse() { var deque = new Deque <int>(new[] { 1, 2 }) as ICollection <int>; Assert.False(deque.Contains(3)); }
public void Contains_ItemPresent_ReturnsTrue() { var deque = new Deque <int>(new[] { 1, 2 }) as ICollection <int>; Assert.True(deque.Contains(2)); }
public void Constructor_FromEmptySequence_UsesDefaultCapacity() { var deque = new Deque <int>(new int[] { }); Assert.Equal(DefaultCapacity, deque.Capacity); }
public void Constructor_CapacityOf1_UsesSpecifiedCapacity() { var deque = new Deque <int>(1); Assert.Equal(1, deque.Capacity); }
public void Constructor_WithoutExplicitCapacity_UsesDefaultCapacity() { var deque = new Deque <int>(); Assert.Equal(DefaultCapacity, deque.Capacity); }