public async Task When_There_Is_No_Message_In_The_Sql_Command_Store_Get_Async()
        {
            Guid commandId = Guid.NewGuid();
            var  exception = await Catch.ExceptionAsync(() => _mysqlCommandStore.GetAsync <MyCommand>(commandId, _contextKey));

            exception.Should().BeOfType <CommandNotFoundException <MyCommand> >();
        }
예제 #2
0
        public async Task When_There_Is_No_Message_In_The_Sql_Command_Store_Async()
        {
            _storedCommand = await _mysqlCommandStore.GetAsync <MyCommand>(Guid.NewGuid());

            //_should_return_an_empty_command_on_a_missing_command
            _storedCommand.Id.Should().Be(Guid.Empty);
        }
예제 #3
0
        public async Task When_There_Is_No_Message_In_The_Sql_Command_Store_Async()
        {
            Guid commandId = Guid.NewGuid();

            _storedCommand = await _mysqlCommandStore.GetAsync <MyCommand>(commandId);

            //_should_return_an_empty_command_on_a_missing_command
            _storedCommand.Id.Should().Be(Guid.Empty);

            bool exists = await _mysqlCommandStore.ExistsAsync <MyCommand>(commandId);

            exists.Should().BeFalse();
        }
예제 #4
0
        public async Task When_Writing_A_Message_To_The_Command_Store_Async()
        {
            await _mysqlCommandStore.AddAsync(_raisedCommand, _contextKey);

            _storedCommand = await _mysqlCommandStore.GetAsync <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);
        }