Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JUnit 4 --> Junit 5 #38

Closed
wants to merge 1 commit into from
Closed

JUnit 4 --> Junit 5 #38

wants to merge 1 commit into from

Conversation

maniksurtani
Copy link
Member

@maniksurtani maniksurtani commented Dec 14, 2017

Moves from JUnit 4 to JUnit 5 - see issue #3

Some notes

  • Replaced MiskTestRule with MiskTestExtension and a @MiskTest annotation which achieves the same thing. See LivenessCheckActionTest and ConfigTest as exemplars of usage.
  • Replaced uses of @Test(expected = ... ) with assertThrows()
  • Moved test harness code (test extensions, etc) along with test dependencies into a sub-module under /misk (we should consider moving stuff in misk.cloud.gcp.testing here too)
  • JUnit 4 is still dragged in as a dependency of Google Truth (see this open issue). Until this is resolved, we should be careful to use the org.junit.jupiter.api.Test annotation and not org.junit.Test by mistake.
  • IntelliJ and gradle integration works out of the box.

override fun modules(): Array<out Module> {
return arrayOf(ConfigModule.create<TestConfig>("test_app"), EnvironmentModule(TESTING))
}

Copy link
Contributor

Choose a reason for hiding this comment

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

super nit: extra blank line

@@ -0,0 +1,27 @@
apply plugin: 'kotlin'
Copy link
Contributor

Choose a reason for hiding this comment

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

+1 to putting test helper code in its own module separate from misk

@maniksurtani
Copy link
Member Author

Closing this in favour of #40

@chris-ryan-square chris-ryan-square deleted the manik/junit5 branch November 16, 2021 03:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants