from messagebus import (
    Message,
    MessageBusException,
    Event,
)
from ._SendMessageRequestValidator import SendMessageRequestValidator
from ._SyncEventRequestValidator import SyncEventRequestValidator


class SyncEventMock(object):
    def __init__(
        self,
        request_validator: SyncEventRequestValidator,
        response: [Message, MessageBusException],
    ):

        self.request_validator = request_validator
        self.response = response

    def is_valid_for(
        self,
        event: Event,
    ) -> bool:

        return self.request_validator.is_valid_for(
            event=event
        )
