-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
I think it would be a nice feature to be able to configure a custom test template. For example, the custom template configuration could look something like
"javaTests.customTemplate": [
"package {PackageName};",
"",
"import static org.assertj.core.api.Assertions.assertThat;",
"",
"import org.junit.jupiter.api.Test;",
"",
"public class {ClassUnderTest}Test {",
"",
" private {ClassUnderTest} classUnderTest;",
"",
" @BeforeEach",
" public void setup() {",
" classUnderTest = new {ClassUnderTest}(serviceProperties);",
" }",
"",
" @Test",
" public void testSomething() {",
" assertThat(2+2).isEqualTo(5);",
" }",
"}",
]
There would need to be some placeholders that would be replaced, such as
- {PackageName}
- {ClassUnderTest}
- {ClassUnderTestAsVarName} (the class under test name, but with the first letter lower case).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels