public void When_The_Message_Is_Already_In_The_Command_Store()
        {
            _exception = Catch.Exception(() => _sqlCommandStore.Add(_raisedCommand));

            //_should_succeed_even_if_the_message_is_a_duplicate
            Assert.Null(_exception);
        }
        public void When_The_Message_Is_Already_In_The_Command_Store()
        {
            _exception = Catch.Exception(() => _sqlCommandStore.Add(_raisedCommand));

            //_should_succeed_even_if_the_message_is_a_duplicate
            _exception.Should().BeNull();
            _sqlCommandStore.Exists <MyCommand>(_raisedCommand.Id).Should().BeTrue();
        }
 public void Establish()
 {
     _sqliteTestHelper = new SqliteTestHelper();
     _sqliteConnection = _sqliteTestHelper.SetupCommandDb();
     _sqlCommandStore  = new SqliteCommandStore(new SqliteCommandStoreConfiguration(_sqliteTestHelper.ConnectionString, _sqliteTestHelper.TableName));
     _raisedCommand    = new MyCommand {
         Value = "Test"
     };
     _sqlCommandStore.Add <MyCommand>(_raisedCommand);
 }
 public SqliteCommandStoreDuplicateMessageTests()
 {
     _sqliteTestHelper = new SqliteTestHelper();
     _sqliteTestHelper.SetupCommandDb();
     _sqlCommandStore = new SqliteCommandStore(new SqliteCommandStoreConfiguration(_sqliteTestHelper.ConnectionString, _sqliteTestHelper.TableName));
     _raisedCommand   = new MyCommand {
         Value = "Test"
     };
     _sqlCommandStore.Add(_raisedCommand);
 }
        public SqliteCommandStoreAddMessageTests()
        {
            _sqliteTestHelper = new SqliteTestHelper();
            _sqliteTestHelper.SetupCommandDb();

            _sqlCommandStore = new SqliteCommandStore(new SqliteCommandStoreConfiguration(_sqliteTestHelper.ConnectionString, _sqliteTestHelper.TableName));
            _raisedCommand   = new MyCommand {
                Value = "Test"
            };
            _contextKey = "context-key";
            _sqlCommandStore.Add(_raisedCommand, _contextKey);
        }