RiskAssessmentServiceTest.java 1.99 KB
package cn.com.glsx.admin.modules.service;

import cn.com.glsx.Application;
import cn.com.glsx.admin.modules.model.vo.*;
import cn.hutool.json.JSONUtil;
import lombok.extern.slf4j.Slf4j;
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;
import java.util.Set;

import static org.junit.Assert.*;

@Slf4j
@RunWith(SpringRunner.class)
@SpringBootTest(classes = Application.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public class RiskAssessmentServiceTest {

    @Autowired
    private RiskAssessmentService riskAssessmentService;

    @Test
    public void getStayPointList() {
        List<StayPointListVO> stayPointList = riskAssessmentService.getStayPointList(67771L);
        System.out.println("stayPointList = " + JSONUtil.toJsonStr(stayPointList));
    }

    @Test
    public void getBasicInformation() {
        BasicInformationVO basicInformation = riskAssessmentService.getBasicInformation(67771L);
        System.out.println("basicInformation = " + JSONUtil.toJsonStr(basicInformation));
    }

    @Test
    public void getResidentInformation() {
        ResidentInformationVO residentInformation = riskAssessmentService.getResidentInformation(67771L);
        System.out.println("residentInformation = " + JSONUtil.toJsonStr(residentInformation));
    }

    @Test
    public void getAlarmInformation() {
        Set<AlarmInformationVO> alarmInformation = riskAssessmentService.getAlarmInformation(67771L);
        System.out.println("alarmInformation = " + JSONUtil.toJsonStr(alarmInformation));
    }

    @Test
    public void getUserBehaviorInformation() {
        UserBehaviorInformationVO userBehaviorInformation = riskAssessmentService.getUserBehaviorInformation(67771L);
        System.out.println("userBehaviorInformation = " + JSONUtil.toJsonStr(userBehaviorInformation));
    }
}