|
|
@ -109,6 +109,7 @@ class DemoApplicationTests { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//废品价格数据
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|
void loadPriceData() { |
|
|
|
void loadPriceData() { |
|
|
|
for (int i = 0; i < 100; i++) { |
|
|
|
for (int i = 0; i < 100; i++) { |
|
|
@ -119,6 +120,20 @@ class DemoApplicationTests { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//废品数据名字自定义
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
|
|
void initPriceDataWithName() { |
|
|
|
|
|
|
|
String[] nameList = new String[]{"废品1", "废品2", "废品2", "废品2", "废品2"}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (String name : nameList) { |
|
|
|
|
|
|
|
GarbageWastePrice price = new GarbageWastePrice(); |
|
|
|
|
|
|
|
price.setName(name); |
|
|
|
|
|
|
|
price.setPrice(new Random().nextInt(100) * 1F); |
|
|
|
|
|
|
|
garbagePriceDao.save(price); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|
void testMessage() { |
|
|
|
void testMessage() { |
|
|
|
LOG.info(messageService.getMessage(GarbageCateGory.type1)); |
|
|
|
LOG.info(messageService.getMessage(GarbageCateGory.type1)); |
|
|
|