<?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');
    }

    /**
     *
     */
    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::toValues());
    }

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