public void When_There_Is_No_Message_In_The_Sql_Inbox_Get() { Guid commandId = Guid.NewGuid(); var exception = Catch.Exception(() => _mysqlInBox.Get <MyCommand>(commandId, _contextKey)); exception.Should().BeOfType <RequestNotFoundException <MyCommand> >(); }
public void When_The_Message_Is_Already_In_The_Command_Store_Different_Context() { _mysqlInbox.Add(_raisedCommand, "some other key"); _exception = Catch.Exception(() => _mysqlInbox.Get <MyCommand>(_raisedCommand.Id, "some other key")); _exception.Should().BeOfType <RequestNotFoundException <MyCommand> >(); }
public async void When_The_Message_Is_Already_In_The_Inbox_Different_Context() { await _mysqlInbox.AddAsync(_raisedCommand, "some other key"); var storedCommand = _mysqlInbox.Get <MyCommand>(_raisedCommand.Id, "some other key"); //_should_read_the_command_from_the__dynamo_db_inbox storedCommand.Should().NotBeNull(); }
public void When_Writing_A_Message_To_The_Inbox() { _storedCommand = _mysqlInbox.Get <MyCommand>(_raisedCommand.Id, _contextKey); //_should_read_the_command_from_the__sql_inbox _storedCommand.Should().NotBeNull(); //_should_read_the_command_value _storedCommand.Value.Should().Be(_raisedCommand.Value); //_should_read_the_command_id _storedCommand.Id.Should().Be(_raisedCommand.Id); }