Skip to content

Instantly share code, notes, and snippets.

@oliverspryn
Last active September 7, 2022 16:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oliverspryn/f7ed89dd65f9a96606456df2b7cb3b5e to your computer and use it in GitHub Desktop.
Save oliverspryn/f7ed89dd65f9a96606456df2b7cb3b5e to your computer and use it in GitHub Desktop.
A collection of file templates and Live templates for Android Studio
describe("when $FUNCTION_NAME$") {
uut.$FUNCTION_NAME$()
$END$
}
describe("$DESCRIPTION$") {
$END$
}
it("$DESCRIPTION$") {
$END$
}
#set( $testName = $NAME )
#set( $uutLength = $testName.length() - 4 )
#set( $uut = $testName.substring(0, $uutLength) )
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME} #end
import io.kotest.core.spec.style.DescribeSpec
class $testName : DescribeSpec({
describe("The $uut") {
val uut: $uut = $uut()
}
})
// For $TYPE$
// Edit variables: enter TYPE, capitalize(NAME) [for the expression], check Skip if Defined
val $NAME$: $TYPE$ = mock()
describe("when $PROPERTY_NAME$") {
val result: $OUTCOME_TYPE$ = uut.$PROPERTY_NAME$
$END$
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment