()
| 46 | } |
| 47 | |
| 48 | @Test |
| 49 | public void testQuery3Quads() { |
| 50 | List<String> uids = Arrays.stream(data).map(d -> uidsMap.get(d)).collect(Collectors.toList()); |
| 51 | |
| 52 | String query = String.format("{ me(func: uid(%s)) { name }}", String.join(",", uids)); |
| 53 | logger.debug("Query: {}\n", query); |
| 54 | |
| 55 | Transaction txn = dgraphClient.newTransaction(); |
| 56 | Response response = txn.query(query); |
| 57 | String res = response.getJson().toStringUtf8(); |
| 58 | logger.debug("Response JSON: {}\n", res); |
| 59 | |
| 60 | String expected = |
| 61 | "{\"me\":[{\"name\":\"ok 200\"},{\"name\":\"ok 300\"},{\"name\":\"ok 400\"}]}"; |
| 62 | assertEquals(res, expected); |
| 63 | assertTrue(response.getTxn().getStartTs() > 0); |
| 64 | txn.discard(); |
| 65 | } |
| 66 | } |
nothing calls this directly
no test coverage detected