Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #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);
        }