コード例 #1
0
        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();
        }
コード例 #3
0
 public DynamoDbImboxDuplicateMessageTests()
 {
     _dynamoDbInbox = new DynamoDbInbox(Client);
     _raisedCommand = new MyCommand {
         Value = "Test"
     };
     _contextKey = "context-key";
     _dynamoDbInbox.Add(_raisedCommand, _contextKey);
 }
コード例 #4
0
        public DynamoDbCommandExistsAsyncTests()
        {
            _command = new MyCommand {
                Id = _guid, Value = "Test Earliest"
            };
            _contextKey = "test-context-key";

            _dynamoDbInbox = new DynamoDbInbox(Client);

            _dynamoDbInbox.Add(_command, _contextKey);
        }
コード例 #5
0
        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);
        }