protected override void Arrange() { Cleanup(); _queueService = new QueueService(); _queuePath = QueueTestHelper.CreateQueuePathForPrivateQueue(ComputerName, TestQueueName, _isTransactional); _queueService.CreateQueue(_queuePath, _isTransactional); _queueService.CreateMessage(_queuePath, new TestClass1 { StringValue1 = "Should not be deleted" }, TestMessagesLabelForMessageWhichShouldNotBeDeleted); _messageData = new TestClass1 { IntValue1 = 1, StringValue1 = "string1" }; _queueService.CreateMessage(_queuePath, _messageData, TestMessagesLabel); _messageToDelete = _queueService.GetMessageInfos(_queuePath, TestMessagesLabel).Single(); }
protected override void Arrange() { Cleanup(); _queueService = new QueueService(); _queuePath = QueueTestHelper.CreateQueuePathForPrivateQueue(ComputerName, TestQueueName, _isTransactional); _queueService.CreateQueue(_queuePath, _isTransactional); for (int i = 1; i <= MessageCount; i++) { var messageData = new TestClass1 { IntValue1 = i, StringValue1 = "string" + i }; _queueService.CreateMessage(_queuePath, messageData, TestMessagesLabel); } }
public async Task QueueCrudTest() { var queueName = "TestQueue"; await _service.CreateMessage <string>(options => options .Name(queueName) .Message("Hello World 2")); var messages = await _service.Messages(options => options .Name(queueName) ); Assert.AreEqual(messages.Any(), true); await _service.DeleteMessage(options => options.Name(queueName).Ids(messages.First().Id)); }
protected override void Act() { _queueService.CreateMessage(_queuePath, _messageData, TestMessagesLabel); }