public void When_The_Message_Is_Already_In_The_Inbox()
        {
            _exception = Catch.Exception(() => _dynamoDbInbox.Add(_raisedCommand, _contextKey));

            //_should_succeed_even_if_the_message_is_a_duplicate
            _exception.Should().BeNull();
        }
        public async Task When_the_message_is_already_in_the_Inbox_async()
        {
            _dynamoDbInbox.Add(_raisedCommand, _contextKey);

            _exception = await Catch.ExceptionAsync(() => _dynamoDbInbox.AddAsync(_raisedCommand, _contextKey));

            //_should_succeed_even_if_the_message_is_a_duplicate
            _exception.Should().BeNull();
        }
 public DynamoDbImboxDuplicateMessageTests()
 {
     _dynamoDbInbox = new DynamoDbInbox(Client);
     _raisedCommand = new MyCommand {
         Value = "Test"
     };
     _contextKey = "context-key";
     _dynamoDbInbox.Add(_raisedCommand, _contextKey);
 }
        public DynamoDbCommandExistsAsyncTests()
        {
            _command = new MyCommand {
                Id = _guid, Value = "Test Earliest"
            };
            _contextKey = "test-context-key";

            _dynamoDbInbox = new DynamoDbInbox(Client);

            _dynamoDbInbox.Add(_command, _contextKey);
        }
        public DynamoDbInboxAddMessageTests()
        {
            _dynamoDbTestHelper = new DynamoDbTestHelper();
            _dynamoDbTestHelper.CreateInboxTable(new DynamoDbInboxBuilder(_dynamoDbTestHelper.DynamoDbInboxTestConfiguration.TableName).CreateInboxTableRequest(readCapacityUnits: 2, writeCapacityUnits: 1));

            _dynamoDbInbox = new DynamoDbInbox(_dynamoDbTestHelper.DynamoDbContext, _dynamoDbTestHelper.DynamoDbInboxTestConfiguration);
            _raisedCommand = new MyCommand {
                Value = "Test"
            };
            _contextKey = "context-key";
            _dynamoDbInbox.Add(_raisedCommand, _contextKey);
        }