public void When_The_Message_Is_Already_In_The_Inbox() { _exception = Catch.Exception(() => _sqlInbox.Add(_raisedCommand, _contextKey)); //_should_succeed_even_if_the_message_is_a_duplicate _exception.Should().BeNull(); AssertionExtensions.Should((bool)_sqlInbox.Exists <MyCommand>(_raisedCommand.Id, _contextKey)).BeTrue(); }
public SqliteInboxDuplicateMessageTests() { _sqliteTestHelper = new SqliteTestHelper(); _sqliteTestHelper.SetupCommandDb(); _sqlInbox = new SqliteInbox(new SqliteInboxConfiguration(_sqliteTestHelper.ConnectionString, _sqliteTestHelper.TableName)); _raisedCommand = new MyCommand { Value = "Test" }; _contextKey = "context-key"; _sqlInbox.Add(_raisedCommand, _contextKey); }