package com.zd.laboratory.onemachine.service;

import com.zd.common.core.domain.R;
import com.zd.laboratory.base.BaseControllerTest;
import com.zd.laboratory.service.ILabStudentsInfoService;
import com.zd.system.api.domain.LabStudentsInfo;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestInstance;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.transaction.annotation.Transactional;

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

/**
 * @Author: zhoupan
 * @Date: 2021/10/13/10:40
 * @Description:
 */
//@SpringBootTest
@DisplayName("一体机服务测试")
class OneMachineServiceTest extends BaseControllerTest{


    @Autowired
    ILabStudentsInfoService studentsInfoService;

    @Autowired
    OneMachineService oneMachineService;

    @Test
    @DisplayName("人脸比较")
    void faceCompare() {
        //获取用户ID是2的用户信息
        LabStudentsInfo labStudentsInfo = studentsInfoService.selectLabStudentsInfoByJoinStudentsId(2L);

        R r = oneMachineService.faceCompare(labStudentsInfo.getJoinStudentsId(), labStudentsInfo.getFaceFeature());

        log.info("验证结果：{}======{}",r.getCode(),r.getMsg());
    }
}