<?php

declare(strict_types=1);

/*
 * This file is part of the Ferienpass package.
 *
 * (c) Richard Henkenjohann <richard@ferienpass.online>
 *
 * For more information visit the project website <https://ferienpass.online>
 * or the documentation under <https://docs.ferienpass.online>.
 */

namespace Ferienpass\CmsBundle\Tests\Application;

use Ferienpass\CmsBundle\Application\ExclusionReasonEvent;
use Ferienpass\CoreBundle\ApplicationSystem\ApplicationSystemInterface;
use Ferienpass\CoreBundle\Entity\Offer\OfferInterface;
use Ferienpass\CoreBundle\Entity\Participant\ParticipantInterface;
use PHPUnit\Framework\TestCase;

final class ExclusionReasonEventTest extends TestCase
{
    public function testGetOffer(): void
    {
        $offer = $this->createMock(OfferInterface::class);
        $participant = $this->createMock(ParticipantInterface::class);
        $system = $this->createMock(ApplicationSystemInterface::class);

        $event = new ExclusionReasonEvent($offer, $participant, $system);

        self::assertSame($offer, $event->getOffer());
    }

    public function testGetParticipant(): void
    {
        $offer = $this->createMock(OfferInterface::class);
        $participant = $this->createMock(ParticipantInterface::class);
        $system = $this->createMock(ApplicationSystemInterface::class);

        $event = new ExclusionReasonEvent($offer, $participant, $system);

        self::assertSame($participant, $event->getParticipant());
    }

    public function testGetApplicationSystem(): void
    {
        $offer = $this->createMock(OfferInterface::class);
        $participant = $this->createMock(ParticipantInterface::class);
        $system = $this->createMock(ApplicationSystemInterface::class);

        $event = new ExclusionReasonEvent($offer, $participant, $system);

        self::assertSame($system, $event->getApplicationSystem());
    }
}
