Beispiel #1
0
        public void When_The_Message_Is_Already_In_The_Command_Store()
        {
            _exception = Catch.Exception(() => _mysqlCommandStore.Add(_raisedCommand, _contextKey));

            //_should_succeed_even_if_the_message_is_a_duplicate
            _exception.Should().BeNull();
            _mysqlCommandStore.Exists <MyCommand>(_raisedCommand.Id, _contextKey).Should().BeTrue();
        }
        public MySqlCommandStoreDuplicateMessageTests()
        {
            _mysqlTestHelper = new MySqlTestHelper();
            _mysqlTestHelper.SetupCommandDb();

            _mysqlCommandStore = new MySqlCommandStore(_mysqlTestHelper.CommandStoreConfiguration);
            _raisedCommand     = new MyCommand {
                Value = "Test"
            };
            _mysqlCommandStore.Add(_raisedCommand);
        }
Beispiel #3
0
        public SqlCommandStoreAddMessageTests()
        {
            _mysqlTestHelper = new MySqlTestHelper();
            _mysqlTestHelper.SetupCommandDb();

            _mysqlCommandStore = new MySqlCommandStore(_mysqlTestHelper.CommandStoreConfiguration);
            _raisedCommand     = new MyCommand {
                Value = "Test"
            };
            _contextKey = "test-context";
            _mysqlCommandStore.Add(_raisedCommand, _contextKey);
        }