Commit 786ba48b authored by Piotr Gawron's avatar Piotr Gawron

drugbank data changed

parent 7c56c63f
Pipeline #27358 passed with stage
in 12 minutes and 40 seconds
......@@ -53,45 +53,6 @@ public class DrugServiceTest extends ServiceTestFunctions {
}
}
@Test
public void testGetTargets() throws Exception {
long count = searchHistoryDao.getCount();
Model model = new ModelFullIndexed(null);
Project project = new Project();
project.setOwner(userDao.getUserByLogin(ADMIN_BUILT_IN_LOGIN));
project.setProjectId("TesT");
project.addModel(model);
Drug drug = drugService.getByName("Diazoxide", new DbSearchCriteria().project(project).ipAddress("ip"));
assertNotNull(drug);
assertNotNull(drug.getName());
assertFalse(drug.getName().trim().equals(""));
assertNotNull(drug.getDescription());
assertFalse(drug.getDescription().trim().equals(""));
String hgnc1 = "SLC12A3";
String hgnc2 = "KCNJ8";
boolean hgnc1Exists = false;
boolean hgnc2Exists = false;
for (Target target : drug.getTargets()) {
for (MiriamData row : target.getGenes()) {
if (row.getResource().equalsIgnoreCase(hgnc1))
hgnc1Exists = true;
if (row.getResource().equalsIgnoreCase(hgnc2))
hgnc2Exists = true;
}
}
assertTrue("Target " + hgnc1 + " doesn't exist in target list but should", hgnc1Exists);
assertTrue("Target " + hgnc2 + " doesn't exist in target list but should", hgnc2Exists);
long count2 = searchHistoryDao.getCount();
assertEquals(count + 1, count2);
assertEquals("YES", drug.getBloodBrainBarrier());
}
@Test
public void testGetTargetsBySynonym() throws Exception {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment