Skip to content

Instantly share code, notes, and snippets.

@NikCapko
Last active August 1, 2023 16:28
Show Gist options
  • Save NikCapko/4f502d9a73d7fa344cc13b9f6a06eb94 to your computer and use it in GitHub Desktop.
Save NikCapko/4f502d9a73d7fa344cc13b9f6a06eb94 to your computer and use it in GitHub Desktop.
Test class for unit testing
@RunWith(JUnit4::class)
class $TestClassName$Test {
@get:Rule
val mockitoRule: MockitoRule = MockitoJUnit.rule()
@Before
fun setUp() {
}
@After
fun tearDown() {
}
@Test
fun `Initial test`() {
val sut: $TestModule$ = $TestModule$($Parameters$)
}
@Test
fun `$TestDescription$`() {
// ARRANGE
val sut: $TestModule$ = $TestModule$($Parameters$)
$END$
// ACTION
// CHECK
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment