package com.qmth.teachcloud.report;

import com.qmth.teachcloud.report.business.enums.PublishStatusEnum;
import com.qmth.teachcloud.report.business.service.AnalyzeForReportService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import javax.annotation.Resource;

/**
 * @Description:
 * @Author: CaoZixuan
 * @Date:
 */
@SpringBootTest(classes = {TeachcloudReportApplication.class})
@RunWith(SpringRunner.class)
public class AnalyzeForStudentServiceTest {
    @Resource
    private AnalyzeForReportService analyzeForReportService;
    @Test
    public void buildAnalyzeExamCourse() {
        Long examId = 2L;
        String courseCode = null;
        System.out.println(analyzeForReportService.buildAnalyzeExamCourse(examId,courseCode));

    }

    @Test
    public void buildAnalyzeExamCourseRecord() {
        Long examId = 1L;
        String courseCode = "1013";
        System.out.println(analyzeForReportService.buildAnalyzeExamCourseRecord(examId,courseCode));
    }

    @Test
    public void buildAnalyzeExamCourseCollegeInspectByOther() {
        Long examId = 1L;
        String courseCode = "1013";
        System.out.println(analyzeForReportService.buildAnalyzeExamCourseCollegeInspect(examId,courseCode));
    }

    @Test
    public void buildAnalyzeExamCourseClazz() {
        Long examId = 1L;
        String courseCode = "1013";
        System.out.println(analyzeForReportService.buildAnalyzeExamCourseClazz(examId,courseCode));
    }

    @Test
    public void analyzePointScoreRate() throws Exception {
        Long examId = 1L;
        String courseCode = "1013";
        analyzeForReportService.buildAnalyzePointScoreRate(examId,courseCode);
    }

    @Test
    public void buildAnalyzeExamCourseCollegeInspectDio() {
        Long examId = 1L;
        String courseCode = "1013";
        System.out.println(analyzeForReportService.buildAnalyzeExamCourseCollegeInspectDio(examId,courseCode));
    }

    @Test
    public void buildAnalyzePaperStruct() {
        Long examId = 1L;
        String courseCode = "1013";
        System.out.println(analyzeForReportService.buildAnalyzePaperStruct(examId,courseCode));
    }

    @Test
    public void buildExamPaperDifficult(){
        Long examId = 1L;
        System.out.println(analyzeForReportService.buildExamPaperDifficult(examId,null));
    }

    @Test
    public void buildExamPaperTeacherDifficult(){
        Long examId = 1L;
        System.out.println(analyzeForReportService.buildExamPaperTeacherDifficult(examId,null));
    }

    @Test
    public void buildAnalyzeExamTotal() {
        Long examId = 1L;
        System.out.println(analyzeForReportService.buildAnalyzeExamTotal(examId,null));
    }

    @Test
    public void buildAnalyzeExamCourseCollegeTeacher() {
        Long examId = 2L;
        String courseCode = null;
        System.out.println(analyzeForReportService.buildAnalyzeExamCourseCollegeTeacher(examId,courseCode));
    }

    @Test
    public void buildAnalyzeExamCourseTeacher() {
        Long examId = 1L;
        String courseCode = "1013";
        System.out.println(analyzeForReportService.buildAnalyzeExamCourseTeacher(examId,courseCode));
    }

    @Test
    public void temp(){
        Long examId = 1L;
        analyzeForReportService.buildAnalyzeExamCourseTeacherDio(examId,null);
        analyzeForReportService.buildExamPaperTeacherDifficult(examId,null);
    }

    @Test
    public void buildDifficult(){
        Long examId = 1L;
        String courseCode = null;
        analyzeForReportService.buildExamPaperDifficult(examId,courseCode);
        analyzeForReportService.buildExamPaperTeacherDifficult(examId,courseCode);
    }




    @Test
    public void finishCalculate(){
        Long examId = 1L;
        String courseCode = "1013";
        System.out.println(analyzeForReportService.updateCoursePublishStatus(examId,courseCode, PublishStatusEnum.WILL_COMPUTE));
    }
}
