<?php

declare(strict_types=1);

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

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

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

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

    /**
     *
     */
    public function testD()
    {
        $this->testing('D');
    }

    /**
     *
     */
    public function testE()
    {
        $this->testing('E');
    }

    /**
     *
     */
    public function testNG()
    {
        $this->testing('NG');
    }

    /**
     *
     */
    public function testLPG()
    {
        $this->testing('LPG');
    }

    /**
     *
     */
    public function testB_NG()
    {
        $this->testing('B_NG');
    }

    /**
     *
     */
    public function testB_LPG()
    {
        $this->testing('B_LPG');
    }

    /**
     *
     */
    public function testPocetDruhovZaznamu()
    {
        self::assertCount(7, DruhPalivaEnum::cases());
    }
}
