package com.izouma.jiashanxia.repo;

import com.izouma.jiashanxia.dto.UserPackageDTO;
import com.izouma.jiashanxia.enums.PackageType;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.List;

@SpringBootTest
@RunWith(SpringRunner.class)
public class UserPackageRepoTest {

    @Autowired
    private UserPackageRepo userPackageRepo;

    @Test
    public void test() {
        List<UserPackageDTO> dtos = userPackageRepo.userPackage(125L);
        dtos.forEach(System.out::println);
    }

    @Test
    public void test1() {
        List<UserPackageDTO> dtos = userPackageRepo.userPackageByType(125L, PackageType.TEAM.toString());
        dtos.forEach(System.out::println);
    }
}