Esempio n. 1
0
        public void Completed_ThenIsClosed()
        {
            var client = new Mock <IQueueClient>();
            AzureCommandQueue queue = new AzureCommandQueue(client.Object);

            queue.Complete();

            client.Verify(c => c.Close(), Times.Once());
        }
Esempio n. 2
0
        public void IsCompleted(bool closed)
        {
            var client = new Mock <IQueueClient>();

            client
            .Setup(c => c.IsClosed)
            .Returns(closed);
            AzureCommandQueue queue = new AzureCommandQueue(client.Object);

            queue.Complete();

            Assert.Equal(closed, queue.IsCompleted);
        }