Skip to content
Snippets Groups Projects
Commit 52391dde authored by jez04's avatar jez04
Browse files

fix: test

parent f32b201e
No related merge requests found
Pipeline #2172 failed with stages
......@@ -56,7 +56,7 @@ class ClassStructureTest {
.size() > 1);
}
void loadScoresFromStreamExceptionTest() throws ScoreNotLoaded, IllegalAccessException, InvocationTargetException, NoSuchMethodException, SecurityException {
void loadScoresFromStreamExceptionTest() throws Exception, IllegalAccessException, InvocationTargetException, NoSuchMethodException, SecurityException {
App app = new App();
try {
app.loadScoresFromStream(new InputStreamReader(App.class.getResourceAsStream("/bestScores-err.csv")))
......@@ -64,8 +64,7 @@ class ClassStructureTest {
fail("Exception not throwen!");
} catch (Exception e) {
assertEquals(ScoreNotLoaded.class, e.getClass(), "Excpectin exception of type ScoreNotLoaded");
ScoreNotLoaded ex = (ScoreNotLoaded) e;
int count = (int)ScoreNotLoaded.class.getDeclaredMethod("getCount").invoke(ex);
int count = (int)ScoreNotLoaded.class.getDeclaredMethod("getCount").invoke(e);
assertTrue(count > 0, "Info about already parsed line missing");
}
}
......
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