<?php

namespace Tests\Services\OracleDOCOrderHeaderService\GetWMSORderOnStartDateTest;

use App\Services\OracleDOCOrderHeaderService;
use Carbon\Carbon;
//use Illuminate\Foundation\Testing\RefreshDatabase;
//use Illuminate\Foundation\Testing\WithFaker;
use Tests\TestCase;

class GetWMSOrderOnStartDateTest extends TestCase
{
    /** @var OracleDOCOrderHeaderService $service */
    public $service;

    public function setUp(): void
    {
        $this->service = app(OracleDOCOrderHeaderService::class);
        parent::setUp();
    }

    public function testGetWMSOrderOnStartDate()
    {
        $carbon =Carbon::now()->subMinutes(5);
        $orderHeaders = $this->service->getWMSOrderOnStartDate($carbon);
        $this->assertNotNull($orderHeaders);
        $orderHeader = $orderHeaders->first();
        $this->assertNotNull($orderHeader->oracleDOCOrderDetails);
        $this->assertNotNull($orderHeader->actAllocationDetails);
        $this->assertNotNull($orderHeader->oracleBASCustomer);
        $this->assertNotNull($orderHeader->oracleBASCode);
    }

}
