예제 #1
0
        public void Contains_FailsWhenQueueIsEmpty()
        {
            // Arrage
            var op    = new AsyncResult();
            var queue = new AsyncResultQueue <AsyncResult>();

            // Act
            var result = queue.Contains(op);

            // Assert
            Assert.False(result);
        }
예제 #2
0
        public void Contains_FindsExistingOperation()
        {
            // Arrage
            var op    = new AsyncResult();
            var queue = new AsyncResultQueue <AsyncResult>()
            {
                op
            };

            // Act
            var result = queue.Contains(op);

            // Assert
            Assert.True(result);
        }
예제 #3
0
        public void Contains_FailsWhenOperationIsNotInQueue()
        {
            // Arrage
            var op    = new AsyncResult();
            var op2   = new AsyncResult();
            var queue = new AsyncResultQueue <AsyncResult>()
            {
                op
            };

            // Act
            var result = queue.Contains(op2);

            // Assert
            Assert.False(result);
        }