Skip to content

Commit

Permalink
Add new snippet qitrc to create an integration test class
Browse files Browse the repository at this point in the history
Closes #754

Signed-off-by: David Thompson <[email protected]>
  • Loading branch information
datho7561 committed Oct 27, 2022
1 parent c73fdd0 commit 127ee97
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,23 @@
"context": {
"type": "io.quarkus.test.junit.SubstrateTest"
}
},
"Quarkus - new integration test resource class": {
"prefix": "qitrc",
"body": [
"package ${1:packagename};",
"",
"import io.quarkus.test.junit.QuarkusIntegrationTest;",
"",
"@QuarkusIntegrationTest",
"public class ${TM_FILENAME_BASE} extends ${2:${TM_FILENAME_BASE/^(.*)IT/$1/}Test} {",
"",
"\t// Execute the same tests, but with the built application.",
"}"
],
"description": "Quarkus integration test resource class",
"context": {
"type": "io.quarkus.test.junit.QuarkusIntegrationTest"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ public void javaSnippets() {

Optional<Snippet> qrtcSnippet = findByPrefix("qtrc", registry);
Assert.assertTrue("Tests has Quarkus - new test resource class (qtrc) snippets", qrtcSnippet.isPresent());

Optional<Snippet> qitrcSnippet = findByPrefix("qitrc", registry);
Assert.assertTrue("Tests has Quarkus - new integration test resource class (qitrc) snippet", qrtcSnippet.isPresent());

ISnippetContext<?> context = qrtcSnippet.get().getContext();
Assert.assertNotNull("Quarkus - new test resource class (qtrc) snippet has context", context);
Expand Down

0 comments on commit 127ee97

Please sign in to comment.