diff --git a/quarkus.ls.ext/com.redhat.quarkus.ls/src/main/resources/com/redhat/quarkus/snippets/quarkus-java.json b/quarkus.ls.ext/com.redhat.quarkus.ls/src/main/resources/com/redhat/quarkus/snippets/quarkus-java.json index 3f8d04a88..35d7a669f 100644 --- a/quarkus.ls.ext/com.redhat.quarkus.ls/src/main/resources/com/redhat/quarkus/snippets/quarkus-java.json +++ b/quarkus.ls.ext/com.redhat.quarkus.ls/src/main/resources/com/redhat/quarkus/snippets/quarkus-java.json @@ -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" + } } -} \ No newline at end of file +} diff --git a/quarkus.ls.ext/com.redhat.quarkus.ls/src/test/java/com/redhat/quarkus/ls/JavaTextDocumentSnippetRegistryTest.java b/quarkus.ls.ext/com.redhat.quarkus.ls/src/test/java/com/redhat/quarkus/ls/JavaTextDocumentSnippetRegistryTest.java index c1465fcb6..f09317d3a 100644 --- a/quarkus.ls.ext/com.redhat.quarkus.ls/src/test/java/com/redhat/quarkus/ls/JavaTextDocumentSnippetRegistryTest.java +++ b/quarkus.ls.ext/com.redhat.quarkus.ls/src/test/java/com/redhat/quarkus/ls/JavaTextDocumentSnippetRegistryTest.java @@ -40,6 +40,9 @@ public void javaSnippets() { Optional qrtcSnippet = findByPrefix("qtrc", registry); Assert.assertTrue("Tests has Quarkus - new test resource class (qtrc) snippets", qrtcSnippet.isPresent()); + + Optional 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);