public void ClearsOutgoingMessages() { _sender.Start(); sendMessages(); _sender.GetMessagesCurrentlySending().ShouldHaveCount(50); _sender.ClearAllMessages(); _sender.GetMessagesCurrentlySending().ShouldHaveCount(0); }
public void ClearsQueueMessages() { _sender.Start(); _receiver.Start(); sendMessages(); Wait.Until(() => _receiver.GetAllMessages("h", null).Length == 50).ShouldBeTrue(); var scope = _receiver.BeginTransactionalScope(); scope.Receive("h"); scope.Commit(); _receiver.GetAllProcessedMessages("h").ShouldHaveCount(1); _receiver.ClearAllMessages(); _receiver.GetAllMessages("h", null).ShouldHaveCount(0); _receiver.GetAllProcessedMessages("h").ShouldHaveCount(0); }