<?php

namespace Tests\Unit\Services\Fees;

use App\Services\Fees\FeeGradeService;
use Tests\TestCase;

class FeeGradeServiceTest extends TestCase
{
    public function test_grade_level_parsing(): void
    {
        $service = new FeeGradeService();

        $this->assertSame(0, $service->getGradeLevel('K'));
        $this->assertSame(99, $service->getGradeLevel('Y'));
        $this->assertSame(3, $service->getGradeLevel('3-A'));
        $this->assertSame(999, $service->getGradeLevel('Unknown'));
    }

    public function test_compare_grades_orders_numeric_then_suffix(): void
    {
        $service = new FeeGradeService();

        $this->assertSame(-1, $service->compareGrades('2', '3'));
        $this->assertSame(-1, $service->compareGrades('3-A', '3-B'));
        $this->assertSame(1, $service->compareGrades('4', '3'));
    }
}
