<?php

namespace Tests\Unit\Services;

use App\Services\FeeCalculationService;
use App\Services\Fees\FeeRefundCalculatorService;
use Mockery;
use Tests\TestCase;

class FeeCalculationServiceTest extends TestCase
{
    public function test_calculate_refund_returns_calculator_amount(): void
    {
        $calculator = Mockery::mock(FeeRefundCalculatorService::class);
        $calculator->shouldReceive('calculateRefund')
            ->once()
            ->with([], 10)
            ->andReturn(['refund_amount' => 123.45]);

        $service = new FeeCalculationService($calculator);

        $this->assertSame(123.45, $service->calculateRefund([], 10));
    }
}
