<?php

namespace Tests\Services\CommodityService;

use App\Services\CommodityService;
use Tests\TestCase;

class GetCommoditySyncAtTest extends TestCase
{
    /**
     * @var CommodityService $service
     */
    private $service;
    public function setUp(): void
    {
        parent::setUp(); // TODO: Change the autogenerated stub
        $this->service = app(CommodityService::class);
    }

    /**
     * @test
     */
    public function getCreatedAsnSyncAt()
    {
        $key = config('sync.asn_sync.created_at');
        $data = $this->service->getCommodityLastSyncAt($key,'create');
        $this->assertNotEmpty($data);
    }

    /**
     * @test
     */
    public function getUpdatedAsnSyncAt()
    {
        $key = config('sync.asn_sync.updated_at');
        $data = $this->service->getCommodityLastSyncAt($key,'update');
        $this->assertNotEmpty($data);
    }
}
