package com.izouma.nineth.service;

import com.izouma.nineth.ApplicationTests;
import com.izouma.nineth.domain.BlindBoxItem;
import com.izouma.nineth.domain.Order;
import com.izouma.nineth.repo.BlindBoxItemRepo;
import com.izouma.nineth.repo.OrderRepo;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;

import static org.junit.jupiter.api.Assertions.*;

class AssetServiceTest extends ApplicationTests {
    @Autowired
    private OrderRepo        orderRepo;
    @Autowired
    private BlindBoxItemRepo blindBoxItemRepo;
    @Autowired
    private AssetService     assetService;

    @Test
    void createAsset() {
        BlindBoxItem item = blindBoxItemRepo.findById(1860L).get();
        Order order = orderRepo.findById(1922L).get();
    }

    @Test
    void cancelConsignment() {
        assetService.cancelConsignment(1209L);
    }

    @Test
    void testCancelConsignment() {
    }

    @Test
    public void testLock() throws InterruptedException {
        assetService.testLock("123", "ddd");
    }
}