You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
960 B
36 lines
960 B
package com.mashibing.service;
|
|
|
|
|
|
import com.github.pagehelper.PageInfo;
|
|
import com.mashibing.entity.District;
|
|
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;
|
|
|
|
@RunWith(SpringRunner.class)
|
|
@SpringBootTest
|
|
public class AirServiceTest {
|
|
|
|
@Autowired
|
|
private AirService airService;
|
|
|
|
@Test
|
|
public void findDistrictList() {
|
|
List<District> list = airService.findDistrictList();
|
|
System.out.println(list);
|
|
}
|
|
|
|
@Test
|
|
public void findAirByDistrictIdAndPage(){
|
|
PageInfo pageInfo = airService.findAirByDistrictIdAndPage(1, 5, null);
|
|
List list = pageInfo.getList();
|
|
for (Object o : list) {
|
|
System.out.println(o);
|
|
}
|
|
System.out.println(pageInfo.getTotal());
|
|
}
|
|
} |