Skip to content

Commit

Permalink
Regroup tests about override
Browse files Browse the repository at this point in the history
Add override test to public_void_methods group so that every method
appears only in one of the generic groups for methods. I think it
improves readability of the list of tests.
  • Loading branch information
stefanbirkner committed Jun 22, 2018
1 parent 1f754f4 commit 77f4580
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,13 @@ public void evaluate() {
}

@RunWith(Parameterized.class)
public static class public_methods_override {
public static class public_non_void_methods {

@Parameters(name = "{0}")
public static List<Object[]> data() {
List<Object[]> methods = new ArrayList<Object[]>();
for (Method method : NoExitSecurityManager.class.getMethods())
if (notDeclaredByObjectClass(method))
if (!voidMethod(method) && notDeclaredByObjectClass(method))
methods.add(new Object[] { testName(method), method });
return methods;
}
Expand Down Expand Up @@ -142,6 +142,12 @@ && notChangedByNoExitSecurityManager(method))
@Parameter(1)
public Method method;

@Test
public void is_implemented_by_NoExitSecurityManager() {
assertThat(method.getDeclaringClass())
.isEqualTo(NoExitSecurityManager.class);
}

@Test
public void may_be_called_when_original_security_manager_is_missing(
) throws Exception {
Expand Down

0 comments on commit 77f4580

Please sign in to comment.