| | |
| | | str = IOUtils.toString(ins,"UTF8"); |
| | | |
| | | PlantService s = new PlantService(); |
| | | List<Integer> list = s.parseMachineIdInGrid(str); |
| | | List<Long> list = s.parseMachineIdInGrid(str); |
| | | |
| | | assertThat(list.size(), is(equalTo(2))); |
| | | |
| | |
| | | |
| | | |
| | | } |
| | | |
| | | @Test |
| | | public void t2() { |
| | | InputStream ins = this.getClass().getClassLoader().getResourceAsStream("plant2.json"); |
| | | |
| | | String str; |
| | | try { |
| | | str = IOUtils.toString(ins,"UTF8"); |
| | | |
| | | PlantService s = new PlantService(); |
| | | List<Long> list = s.parseMachineIdInGrid(str); |
| | | //Integer m2Id = 2240138065925; |
| | | assertThat(list.size(), is(equalTo(2))); |
| | | |
| | | System.out.println(list.size()); |
| | | } catch (IOException e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | |
| | | } |
| | | } |