Commit ce4d4774 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

fix unit tests

parent 99adff4d
Pipeline #47151 failed with stage
in 7 minutes and 31 seconds
......@@ -217,7 +217,7 @@ public class PdbAnnotator extends ElementAnnotator implements IExternalService {
}
}
}
} catch (IOException e1) {
} catch (Exception e1) {
logger.error(e1, e1);
}
......
......@@ -39,19 +39,17 @@ import lcsb.mapviewer.persist.DbUtils;
public class ElementAnnotatorImplementationsTest extends AnnotationTestFunctions {
private static AnnotationConfigApplicationContext applicationContext;
@SuppressWarnings("unused")
@Parameter
private String testName;
public String testName;
@Parameter(1)
private Class<? extends ElementAnnotator> elementAnnotator;
public Class<? extends ElementAnnotator> elementAnnotator;
@Parameter(2)
private MiriamData sourceIdentifier;
public MiriamData sourceIdentifier;
@Parameter(3)
private BioEntity bioEntity;
public BioEntity bioEntity;
@AfterClass
public static void shutDown() {
......
......@@ -157,7 +157,7 @@ public class PdbAnnotatorTest extends AnnotationTestFunctions {
WebPageDownloader downloader = pdbAnnotator.getWebPageDownloader();
try {
WebPageDownloader mockDownloader = Mockito.mock(WebPageDownloader.class);
when(mockDownloader.getFromNetwork(anyString(), anyString(), anyString())).thenReturn("");
when(mockDownloader.getFromNetwork(anyString(), anyString(), nullable(String.class))).thenThrow(new RuntimeException());
pdbAnnotator.setWebPageDownloader(mockDownloader);
assertEquals(ExternalServiceStatusType.DOWN, pdbAnnotator.getServiceStatus().getStatus());
} finally {
......
......@@ -17,7 +17,7 @@ import org.junit.runners.Parameterized.Parameters;
public class ReferenceMappingTest {
@Parameter(0)
private String gpmlType;
public String gpmlType;
@Parameters(name = "{0}")
public static Collection<Object[]> data() throws IOException {
......
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