<?php


namespace Tests\Inventory\Services\InventoryAccountService;


use App\InventoryAccount;
use App\InventoryAccountMission;
use App\Services\InventoryAccountService;
use Tests\TestCase;

class InventoryAccountService_CreateMissionTest extends TestCase
{

    public $inventory;
    public $inventoryMissions;
    function setUp(): void
    {
        parent::setUp(); // TODO: Change the autogenerated stub
    }
        function testCreateMissionsFail(){
        $realService=new InventoryAccountService();
        $this->inventory=$realService->createMission('2020-08-20','2020-08-20','','','');
        $this->assertNull($this->inventory);
    }
    function testCreateMissionsSuccess(){
        $realService=new InventoryAccountService();
        $this->inventory=$realService->createMission('2020-08-20','2020-08-20',3,'','');
        $this->assertIsObject($this->inventory);
        $this->assertNotEmpty($this->inventory);
    }
    function tearDown(): void
    {
        InventoryAccountMission::where('inventory_account_id',$this->inventory['id'])->delete();
        InventoryAccount::where('id',$this->inventory['id'])->forceDelete();
        parent::tearDown(); // TODO: Change the autogenerated stub
    }


}





