/** Tests searching by gene id with case sensitivity enabled. */ @Test public void searchGeneId() { action.getSearchParameters().setSearchType(SearchType.GENE_ID); action.getSearchParameters().setInputValues("1,2,3,4"); action.getSearchParameters().setCaseSensitiveSearch(true); assertEquals(GENE_RESULT, action.search()); assertTrue(action.getGeneResults().size() > 0); Db2DbParams expectedInput = new Db2DbParams(); expectedInput.setInputValues("1,2,3,4"); verify(bioDbNetRemoteService).db2db(refEq(expectedInput, ignoredParams)); }
/** Tests searching by gene pathways with case sensitivity disabled. */ @Test public void searchPathwaysCaseInsensitive() { action.getSearchParameters().setSearchType(SearchType.PATHWAY); action.getSearchParameters().setInputValues(PATHWAY_NAME); action.getSearchParameters().setCaseSensitiveSearch(false); assertEquals(GENE_RESULT, action.search()); assertTrue(action.getGeneResults().size() > 0); Db2DbParams expectedInput = new Db2DbParams(); expectedInput.setInputValues("H_BARD1PATHWAY,H_bard1Pathway,h_bard1Pathway,h_bard1pathway"); verify(bioDbNetRemoteService).db2db(refEq(expectedInput, ignoredParams)); }
/** Tests searching by gene alias with case sensitivity enabled. */ @Test public void searchGeneSymbolCaseInsensitive() { action.getSearchParameters().setSearchType(SearchType.GENE_SYMBOL); action.getSearchParameters().setInputValues("BRCA1,BRCA2"); action.getSearchParameters().setCaseSensitiveSearch(false); assertEquals(GENE_RESULT, action.search()); assertTrue(action.getGeneResults().size() > 0); Db2DbParams expectedInput = new Db2DbParams(); expectedInput.setInputValues("BRCA1,BRCA2,brca1,brca2"); verify(bioDbNetRemoteService).db2db(refEq(expectedInput, ignoredParams)); }
/** Tests search of pathways by genes with case sensitivity disabled. */ @Test public void searchPathwaysByGeneCaseInsensitive() { action.getSearchParameters().setSearchType(SearchType.PATHWAY_BY_GENE); action.getSearchParameters().setInputValues("BRCA1"); action.getSearchParameters().setCaseSensitiveSearch(false); assertEquals(PATHWAY_RESULTS, action.search()); assertTrue(action.getGeneResults().isEmpty()); assertFalse(action.getPathwayResults().isEmpty()); assertEquals(5, action.getPathwayResults().size()); Db2DbParams expectedInput = new Db2DbParams(); expectedInput.setInputValues("BRCA1,brca1"); verify(bioDbNetRemoteService).db2db(refEq(expectedInput, ignoredParams)); }