public async Task When_There_Is_No_Message_In_The_Sql_Inbox_And_I_Get_Async() { Guid commandId = Guid.NewGuid(); var exception = await Catch.ExceptionAsync(() => _sqlSqlInbox.GetAsync <MyCommand>(commandId, "some-key")); AssertionExtensions.Should((object)exception).BeOfType <RequestNotFoundException <MyCommand> >(); }
public async Task When_Writing_A_Message_To_The_Inbox_Async() { await _pgSqlInbox.AddAsync(_raisedCommand, _contextKey); _storedCommand = await _pgSqlInbox.GetAsync <MyCommand>(_raisedCommand.Id, _contextKey); //_should_read_the_command_from_the__sql_inbox AssertionExtensions.Should((object)_storedCommand).NotBeNull(); //_should_read_the_command_value AssertionExtensions.Should((string)_storedCommand.Value).Be(_raisedCommand.Value); //_should_read_the_command_id AssertionExtensions.Should((Guid)_storedCommand.Id).Be(_raisedCommand.Id); }