<?php

declare(strict_types=1);

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

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

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

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

    /**
     *
     */
    public function testNKAT()
    {
        $this->testing('NKAT');
    }

    /**
     *
     */
    public function testNKAT_OBD()
    {
        $this->testing('NKAT_OBD');
    }

    /**
     *
     */
    public function testRKAT()
    {
        $this->testing('RKAT');
    }

    /**
     *
     */
    public function testRKAT_OBD()
    {
        $this->testing('RKAT_OBD');
    }

    /**
     *
     */
    public function testNULL()
    {
        $this->testing('NULL');
    }

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