Skip to content

Remove TestNG from TestHelper#2007

Merged
jodastephen merged 1 commit intomasterfrom
topic/test-helper
Jun 20, 2019
Merged

Remove TestNG from TestHelper#2007
jodastephen merged 1 commit intomasterfrom
topic/test-helper

Conversation

@jodastephen
Copy link
Copy Markdown
Contributor

Allows the class to be used from tests in either JUnit or TestNG.
Without this TestNG and JUnit are both seen by maven when running tests.

Allows the class to be used from JUnit tests
Without this TestNG and JUnit are both seen by maven when running tests
public static void assertUtilityClass(Class<?> clazz) {
assertNotNull(clazz, "assertUtilityClass() called with null class");
assertTrue(Modifier.isFinal(clazz.getModifiers()), "Utility class must be final");
assertEquals(Modifier.isFinal(clazz.getModifiers()), true, "Utility class must be final");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth defining assertTrue? It's such a standard method. assertEquals(..., true) seems a bit odd.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are private methods, and since they are only used in a couple of places, it didn't seem worthwhile.

@jodastephen jodastephen merged commit 615dc22 into master Jun 20, 2019
@delete-merged-branch delete-merged-branch bot deleted the topic/test-helper branch June 20, 2019 14:39
@jodastephen jodastephen added this to the v2.5 milestone Jun 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants