<?php

require_once __DIR__ . '/SegmentSeatAvailabilityBootstrap.php';

use App\Libraries\BookingOfferFareService;
use PHPUnit\Framework\TestCase;

final class BookingOfferFareServiceTest extends TestCase
{
    public function testMoneyToleranceViaReflection(): void
    {
        $ref = new ReflectionClass(BookingOfferFareService::class);
        $method = $ref->getMethod('moneyClose');
        $method->setAccessible(true);

        $this->assertTrue($method->invoke(null, 522.0, 522.04));
        $this->assertFalse($method->invoke(null, 522.0, 522.10));
        $this->assertTrue($method->invoke(null, 532.0, 532.0));
    }
}
