public async Task When_There_Is_No_Message_In_The_Sql_Inbox_And_I_Check_Exists_Async() { Guid commandId = Guid.NewGuid(); bool exists = await _sqlInbox.ExistsAsync <MyCommand>(commandId, "some-key"); exists.Should().BeFalse(); }
public async Task When_The_Message_Is_Already_In_The_Inbox_Async() { await _sqlInbox.AddAsync(_raisedCommand, _contextKey); _exception = await Catch.ExceptionAsync(() => _sqlInbox.AddAsync(_raisedCommand, _contextKey)); //_should_succeed_even_if_the_message_is_a_duplicate _exception.Should().BeNull(); var exists = await _sqlInbox.ExistsAsync <MyCommand>(_raisedCommand.Id, _contextKey); exists.Should().BeTrue(); }