Permalink
Browse files

Service not responding json anymore

  • Loading branch information...
1 parent b9ffc4b commit 2166bd37c9df6d1d04681096a3afe169d45bc3e8 @mwl mwl committed Sep 16, 2012
@@ -107,7 +107,7 @@ public boolean evaluate(ConceptRelation relation) {
concept = conceptRepository.findOne(causativesDrugAllergy.get(0).getChild().getNodeId());
- return new ResponseEntity<String>(gson.toJson(concept.getConceptId()), HttpStatus.OK);
+ return new ResponseEntity<String>(concept.getConceptId(), HttpStatus.OK);
}
private long causativeAgentId() {
@@ -109,8 +109,8 @@ module.directive("caveRegistration", function($http, $log) {
scope.findDrug = function(query) {
scope.allergyTree = undefined;
$log.info("Will lookup " + query)
- $http.get("/drugs/concepttree?name=" + query).success(function(drug, status) {
- getConcept(drug.allergyId)
+ $http.get("/drugs/concepttree?name=" + query).success(function(allergyId, status) {
+ getConcept(allergyId)
})
}
@@ -36,10 +36,10 @@ public DrugController drugController() {
@Test
public void willAlwaysReturnNonCombinedDrug() throws Exception {
- for (int i = 0; i < 10; i++) {
- String json = drugController.tree("Paracetamol").getBody();
- assertNotNull(json);
- assertEquals(i + " of 10", "293584003", gson.fromJson(json, String.class));
+ for (int i = 0; i < 100; i++) {
+ String allergyId = drugController.tree("Paracetamol").getBody();
+ assertNotNull(allergyId);
+ assertEquals(i + " of 10", "293584003", allergyId);
}
}
}

0 comments on commit 2166bd3

Please sign in to comment.