예제 #1
0
        public async Task WillWriteMessageFileToQueueDirectory()
        {
            var message = new CloudQueueMessage("Test message");

            await _queue.AddMessageAsync(message);

            var file = Directory.GetFiles(BasePath).FirstOrDefault();

            Assert.NotNull(file);
        }
예제 #2
0
        public async Task DeleteWillRemoveFile()
        {
            await _queue.AddMessageAsync(new CloudQueueMessage("First test message"));

            var message = await _queue.GetMessageAsync();

            await _queue.DeleteMessageAsync(message);

            var files = Directory.GetFiles(BasePath);

            Assert.Empty(files);
        }
예제 #3
0
        public async Task CanGetWrittenMessage()
        {
            await _queue.AddMessageAsync(new CloudQueueMessage("Test message"));

            var message = await _queue.GetMessageAsync();

            Assert.Equal("Test message", message.AsString);
        }