Skip to content

Commit

Permalink
205: don't use assertThrows because wasn't there in Photon
Browse files Browse the repository at this point in the history
Task-Url: #205
  • Loading branch information
LorenzoBettini committed Aug 25, 2022
1 parent ae4e464 commit b7122ba
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.pitest.pitclipse.ui.tests;

import static org.junit.Assert.assertThrows;
import static org.junit.Assert.fail;
import static org.pitest.pitclipse.ui.behaviours.pageobjects.PageObjects.PAGES;

import java.util.Collections;
Expand Down Expand Up @@ -226,14 +226,17 @@ class MyException extends RuntimeException {
// cancel the launch
// we also have to interrupt with an exception, otherwise it waits
// for PIT to terminate
assertThrows(MyException.class, () ->
try {
runTest(FOO_TEST_CLASS_MULTIPLE_LAUNCHES, FOO_BAR_PACKAGE, TEST_PROJECT,
() ->
{
new TestConfigurationSelectorDialog(bot)
.cancel();
throw new MyException();
})
);
});
fail("should not get here: missed MyException");
} catch (MyException e) {
// OK
}
}
}

0 comments on commit b7122ba

Please sign in to comment.