package com.izouma.dingdong.contorller;

import com.izouma.dingdong.dto.PageQuery;
import com.izouma.dingdong.web.CouponController;
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.HashMap;
import java.util.Map;

@SpringBootTest
@RunWith(SpringRunner.class)
public class CouponControllerTest {
    @Autowired
    private CouponController couponController;

    @Test
    public void test() {

        long startTime = System.currentTimeMillis(); //获取开始时间
        PageQuery pageQuery = new PageQuery();
        pageQuery.setPage(0);
        pageQuery.setSize(50);
        pageQuery.setSearch(null);
        pageQuery.setSort("");
        couponController.all(pageQuery);
        long endTime = System.currentTimeMillis(); //获取结束时间
        System.out.println("程序运行时间：" + (endTime - startTime) + "ms"); //输出程序运行时间

    }
}
