1 @RunWith(SpringJUnit4ClassRunner.class)
2 @ContextConfiguration(locations = {"/applicationContext.xml",
3 "/com/jl/sinter/service/spring/conf/quality_spring_dao.xml",
4 "/com/jl/sinter/service/spring/conf/quality_spring_service.xml",
5 "/com/jl/sinter/service/spring/conf/common_spring.xml"
6 })
7 @TransactionConfiguration(transactionManager = "transactionManager", defaultRollback = true)
8 @Transactional
9
10 public class ConsumeFacadeTest {
11
12 @Test
13 public void getConsumeInfoByFilter() {
14 MonitorQueryFilter filter = new MonitorQueryFilter();
15 filter.setQueryDate("2009-02-16");
16 filter.setDutyClassId("3");
17 filter.setDutyShiftId("2");
18 filter.setSinterId("xxxxxxxxxxxxxxxxxxxxxxxxxxxxx001");
19 List<PowerConsumption> pcList = consumeFacade.getConsumeInfoByFilter(filter);
20 if (CollectionUtils.isNotEmpty(pcList)) {
21 for (PowerConsumption pc : pcList) {
22 System.out.println(pc);
23 }
24 }
25 }
26
27 }