public void When_There_Is_No_Message_In_The_Sql_Command_Store() { _storedCommand = _mysqlCommandStore.Get <MyCommand>(Guid.NewGuid()); //_should_return_an_empty_command_on_a_missing_command _storedCommand.Id.Should().Be(Guid.Empty); }
public void When_There_Is_No_Message_In_The_Sql_Command_Store_Get() { Guid commandId = Guid.NewGuid(); var exception = Catch.Exception(() => _mysqlCommandStore.Get <MyCommand>(commandId, _contextKey)); exception.Should().BeOfType <CommandNotFoundException <MyCommand> >(); }
public void When_The_Message_Is_Already_In_The_Command_Store_Different_Context() { _mysqlCommandStore.Add(_raisedCommand, "some other key"); _exception = Catch.Exception(() => _mysqlCommandStore.Get <MyCommand>(_raisedCommand.Id, "some other key")); _exception.Should().BeOfType <CommandNotFoundException <MyCommand> >(); }
public async void When_The_Message_Is_Already_In_The_Command_Store_Different_Context() { await _mysqlCommandStore.AddAsync(_raisedCommand, "some other key"); var storedCommand = _mysqlCommandStore.Get <MyCommand>(_raisedCommand.Id, "some other key"); //_should_read_the_command_from_the__dynamo_db_command_store storedCommand.Should().NotBeNull(); }
public void When_There_Is_No_Message_In_The_Sql_Command_Store() { Guid commandId = Guid.NewGuid(); _storedCommand = _mysqlCommandStore.Get <MyCommand>(commandId, _contextKey); //_should_return_an_empty_command_on_a_missing_command _storedCommand.Id.Should().Be(Guid.Empty); _mysqlCommandStore.Exists <MyCommand>(commandId, _contextKey).Should().BeFalse(); }
public void When_Writing_A_Message_To_The_Command_Store() { _storedCommand = _mysqlCommandStore.Get <MyCommand>(_raisedCommand.Id, _contextKey); //_should_read_the_command_from_the__sql_command_store _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); }