()
| 173 | } |
| 174 | |
| 175 | @Test |
| 176 | public void testStore() throws Exception { |
| 177 | inpDB = GenRandomData.genRandSmallTupDataBag(new Random(), 10, 100); |
| 178 | storeAndCopyLocally(inpDB); |
| 179 | |
| 180 | int size = 0; |
| 181 | BufferedReader br = new BufferedReader(new FileReader(outputFileName)); |
| 182 | for(String line=br.readLine();line!=null;line=br.readLine()){ |
| 183 | String[] flds = line.split("\t",-1); |
| 184 | Tuple t = new DefaultTuple(); |
| 185 | t.append(flds[0].compareTo("")!=0 ? flds[0] : null); |
| 186 | t.append(flds[1].compareTo("")!=0 ? Integer.parseInt(flds[1]) : null); |
| 187 | |
| 188 | System.err.println("Simple data: "); |
| 189 | System.err.println(line); |
| 190 | System.err.println("t: "); |
| 191 | System.err.println(t); |
| 192 | assertTrue(TestHelper.bagContains(inpDB, t)); |
| 193 | ++size; |
| 194 | } |
| 195 | assertEquals(size, inpDB.size()); |
| 196 | br.close(); |
| 197 | } |
| 198 | |
| 199 | /** |
| 200 | * @param inpD |
nothing calls this directly
no test coverage detected