Exemplo n.º 1
0
        public void When_Writing_A_Message_To_The_Inbox()
        {
            _storedCommand = _sqlInbox.Get <MyCommand>(_raisedCommand.Id, _contextKey);

            //_should_read_the_command_from_the__sql_inbox
            _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);
        }
Exemplo n.º 2
0
        public void When_The_Message_Is_Already_In_The_Inbox_Different_Context()
        {
            _sqlInbox.Add(_raisedCommand, "some other key");

            var storedCommand = _sqlInbox.Get <MyCommand>(_raisedCommand.Id, "some other key");

            //_should_read_the_command_from_the__dynamo_db_inbox
            AssertionExtensions.Should((object)storedCommand).NotBeNull();
        }
        public async void When_The_Message_Is_Already_In_The_Inbox_Different_Context()
        {
            await _sqlInbox.AddAsync(_raisedCommand, "some other key");

            var storedCommand = _sqlInbox.Get <MyCommand>(_raisedCommand.Id, "some other key");

            //_should_read_the_command_from_the__dynamo_db_command_store
            storedCommand.Should().NotBeNull();
        }