<?php

namespace Tests\Services\OrderService;

use App\Services\OrderService;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;

class GetOrderSyncAtTest extends TestCase
{
    /**
     * @var OrderService $service
     */
    private $service;

    public function setUp(): void
    {
        parent::setUp(); // TODO: Change the autogenerated stub
        $this->service = app('OrderService');
    }

    /**
     * @test
     */
    public function getCreatedOrderSyncAt()
    {
        $key = config('sync.order_sync.cache_prefix.created_at');
        $data = $this->service->getOrderSyncAt($key);
        $this->assertNotEmpty($data);
    }

    /**
     * @test
     */
    public function getUpdatedOrderSyncAt()
    {
        $key = config('sync.order_sync.cache_prefix.updated_at');
        $data = $this->service->getOrderSyncAt($key,'renewal');
        $this->assertNotEmpty($data);
    }

    public function tearDown(): void
    {
        parent::tearDown(); // TODO: Change the autogenerated stub
    }
}
