<?php

declare(strict_types=1);

namespace Seka\Portal\Modul\Statistiky\Tests\Unit\Entities\Zaznam\Enums;

use Seka\Portal\Modul\Statistiky\Entities\Zaznam\Enums\StavEmisnejKontrolyEnum;
use Seka\Portal\Modul\Statistiky\Tests\TestCase;

/**
 * Class StavEmisnejKontrolyEnumTest
 *
 * @package Seka\Portal\Modul\Statistiky\Tests\Unit\Entities\Zaznam\Enums
 */
class StavEmisnejKontrolyEnumTest extends TestCase
{
    /**
     *
     */
    public function testPRIJEM()
    {
        $this->testing('PRIJEM');
    }

    /**
     * @param string $value
     */
    private function testing(string $value)
    {
        self::assertStringEndsWith($value, StavEmisnejKontrolyEnum::from($value)->value);
        self::assertStringStartsWith($value, StavEmisnejKontrolyEnum::from($value)->value);
        self::assertTrue(StavEmisnejKontrolyEnum::from($value)->equal(StavEmisnejKontrolyEnum::from($value)));
    }

    /**
     *
     */
    public function testPREVZATIE()
    {
        $this->testing('PREVZATIE');
    }

    /**
     *
     */
    public function testMERANIE()
    {
        $this->testing('MERANIE');
    }

    /**
     *
     */
    public function testUZAVRETIE()
    {
        $this->testing('UZAVRETIE');
    }

    /**
     *
     */
    public function testARCHIV()
    {
        $this->testing('ARCHIV');
    }

    /**
     *
     */
    public function testSTORNO()
    {
        $this->testing('STORNO');
    }

    /**
     *
     */
    public function testPocetDruhovZaznamu()
    {
        self::assertCount(6, StavEmisnejKontrolyEnum::cases());
    }
}
