| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- package com.izouma.nineth.service;
- import com.izouma.nineth.ApplicationTests;
- import com.izouma.nineth.domain.*;
- import com.izouma.nineth.repo.*;
- 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;
- @Autowired
- private CollectionRepo collectionRepo;
- @Autowired
- private UserRepo userRepo;
- @Autowired
- private CollectionService collectionService;
- @Autowired
- private AssetMintService assetMintService;
- @Autowired
- private AssetRepo assetRepo;
- @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");
- }
- @Test
- public void testCreateAsset() {
- Order order = orderRepo.findById(4618L).get();
- Collection collection = collectionRepo.findById(order.getCollectionId()).get();
- BlindBoxItem blindBoxItem = blindBoxItemRepo.findById(4250L).get();
- User user = userRepo.findById(order.getUserId()).get();
- assetService.createAsset(blindBoxItem, user, order.getId(), order.getPrice(), "出售", 1);
- }
- @Test
- public void mint() {
- Asset asset = assetRepo.findById(4622L).get();
- assetMintService.mint(asset, 1L);
- }
- }
|