public SqlInboxEmptyWhenSearchedAsyncTests() { _pgTestHelper = new PostgresSqlTestHelper(); _pgTestHelper.SetupCommandDb(); _sqlSqlInbox = new PostgresSqlInbox(_pgTestHelper.InboxConfiguration); }
public SqlOutboxWritingMessageTests() { _postgresSqlTestHelper = new PostgresSqlTestHelper(); _postgresSqlTestHelper.SetupMessageDb(); _sqlOutboxSync = new PostgreSqlOutboxSync(_postgresSqlTestHelper.OutboxConfiguration); var messageHeader = new MessageHeader( messageId: Guid.NewGuid(), topic: "test_topic", messageType: MessageType.MT_DOCUMENT, timeStamp: DateTime.UtcNow.AddDays(-1), handledCount: 5, delayedMilliseconds: 5, correlationId: Guid.NewGuid(), replyTo: "ReplyTo", contentType: "text/plain"); messageHeader.Bag.Add(_key1, _value1); messageHeader.Bag.Add(_key2, _value2); messageHeader.Bag.Add(_key3, _value3); messageHeader.Bag.Add(_key4, _value4); messageHeader.Bag.Add(_key5, _value5); _messageEarliest = new Message(messageHeader, new MessageBody("message body")); _sqlOutboxSync.Add(_messageEarliest); }
public PostgreSqlOutboxEmptyStoreTests() { _postgresSqlTestHelper = new PostgresSqlTestHelper(); _postgresSqlTestHelper.SetupMessageDb(); _sqlOutbox = new PostgreSqlOutbox(_postgresSqlTestHelper.OutboxConfiguration); _messageEarliest = new Message(new MessageHeader(Guid.NewGuid(), "test_topic", MessageType.MT_DOCUMENT), new MessageBody("message body")); }
public SqlInboxEmptyWhenSearchedTests() { _pgTestHelper = new PostgresSqlTestHelper(); _pgTestHelper.SetupCommandDb(); _pgSqlInbox = new PostgresSqlInbox(_pgTestHelper.InboxConfiguration); _contextKey = "context-key"; }
public PostgreSqlOutboxMessageAlreadyExistsTests() { _postgresSqlTestHelper = new PostgresSqlTestHelper(); _postgresSqlTestHelper.SetupMessageDb(); _sqlOutboxSync = new PostgreSqlOutboxSync(_postgresSqlTestHelper.OutboxConfiguration); _messageEarliest = new Message(new MessageHeader(Guid.NewGuid(), "test_topic", MessageType.MT_DOCUMENT), new MessageBody("message body")); _sqlOutboxSync.Add(_messageEarliest); }
public SqlInboxDuplicateMessageTests() { _pgTestHelper = new PostgresSqlTestHelper(); _pgTestHelper.SetupCommandDb(); _pgSqlInbox = new PostgresSqlInbox(_pgTestHelper.InboxConfiguration); _raisedCommand = new MyCommand { Value = "Test" }; _contextKey = Guid.NewGuid().ToString(); }
public SqlInboxDuplicateMessageAsyncTests() { _pgTestHelper = new PostgresSqlTestHelper(); _pgTestHelper.SetupCommandDb(); _pgSqlInbox = new PostgresSqlInbox(_pgTestHelper.InboxConfiguration); _raisedCommand = new MyCommand { Value = "Test" }; _contextKey = "test-context"; }
public SqlInboxAddMessageTests() { _pgTestHelper = new PostgresSqlTestHelper(); _pgTestHelper.SetupCommandDb(); _pgSqlInbox = new PostgresSqlInbox(_pgTestHelper.InboxConfiguration); _raisedCommand = new MyCommand { Value = "Test" }; _contextKey = "context-key"; _pgSqlInbox.Add(_raisedCommand, _contextKey); }
public SqlOutboxWritngMessagesTests() { _postgresSqlTestHelper = new PostgresSqlTestHelper(); _postgresSqlTestHelper.SetupMessageDb(); _sqlOutbox = new PostgreSqlOutbox(_postgresSqlTestHelper.OutboxConfiguration); _messageEarliest = new Message(new MessageHeader(Guid.NewGuid(), "Test", MessageType.MT_COMMAND, DateTime.UtcNow.AddHours(-3)), new MessageBody("Body")); _sqlOutbox.Add(_messageEarliest); var message2 = new Message(new MessageHeader(Guid.NewGuid(), "Test2", MessageType.MT_COMMAND, DateTime.UtcNow.AddHours(-2)), new MessageBody("Body2")); _sqlOutbox.Add(message2); _messageLatest = new Message(new MessageHeader(Guid.NewGuid(), "Test3", MessageType.MT_COMMAND, DateTime.UtcNow.AddHours(-1)), new MessageBody("Body3")); _sqlOutbox.Add(_messageLatest); }
public PostgreSqlOutboxRangeRequestTests() { _postgresSqlTestHelper = new PostgresSqlTestHelper(); _postgresSqlTestHelper.SetupMessageDb(); _sqlOutboxSync = new PostgreSqlOutboxSync(_postgresSqlTestHelper.OutboxConfiguration); var messageEarliest = new Message(new MessageHeader(Guid.NewGuid(), _TopicFirstMessage, MessageType.MT_DOCUMENT), new MessageBody("message body")); var message1 = new Message(new MessageHeader(Guid.NewGuid(), "test_topic2", MessageType.MT_DOCUMENT), new MessageBody("message body2")); var message2 = new Message(new MessageHeader(Guid.NewGuid(), _TopicLastMessage, MessageType.MT_DOCUMENT), new MessageBody("message body3")); _sqlOutboxSync.Add(messageEarliest); Task.Delay(100); _sqlOutboxSync.Add(message1); Task.Delay(100); _sqlOutboxSync.Add(message2); }