private void VerifyState(ConcurrentDeque <int> deque, long expectedCount, long expectedSum) { //Assert Assert.Equal(expectedCount, deque.Count); Assert.Equal(expectedSum, deque.LongSum()); //test internal state //traverse the deque in both directions Assert.Equal(expectedCount, deque.TraverseLeftRight().LongCount()); Assert.Equal(expectedCount, deque.TraverseRightLeft().LongCount()); }