package com.tykj.dev.finalcheck;

import com.tykj.dev.device.finalcheck.controller.FinalCheckController;
import com.tykj.dev.device.finalcheck.entity.dto.TimeParam;
import com.tykj.dev.union.BaseTest;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.test.context.support.WithMockUser;
import org.springframework.test.context.ActiveProfiles;

import java.time.LocalDate;

/**
 * FinalCheckControllerTest.
 *
 * @author Matrix <xhyrzldf@gmail.com>
 * @since 2020/9/28 at 5:02 下午
 */
@WithMockUser(username = "shena", password = "qwer1234", authorities = "省A专管员")
@ActiveProfiles("test")
public class FinalCheckControllerTest extends BaseTest {

    @Autowired
    private FinalCheckController fcController;

    @Test
    public void generateReport() {
        TimeParam timeParam = new TimeParam(LocalDate.of(2020, 1, 1),
                LocalDate.of(2020, 11, 1));
        System.out.println(fcController.generateReport(timeParam));
    }
}
