Skip to content

Commit

Permalink
Codestarts - Change native image tests to use @QuarkusIntegrationTest
Browse files Browse the repository at this point in the history
  • Loading branch information
edeandrea committed Feb 7, 2022
1 parent 933c4d4 commit e660187
Show file tree
Hide file tree
Showing 59 changed files with 201 additions and 189 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package {package-name}.it;

import io.quarkus.test.junit.QuarkusIntegrationTest;

@QuarkusIntegrationTest
public class {class-name-base}ResourceIT extends {class-name-base}ResourceTest {
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package org.acme;

import io.quarkus.test.junit.QuarkusIntegrationTest;

@QuarkusIntegrationTest
public class {resource.class-name}IT extends {resource.class-name}Test {

// Execute the same tests but in native mode.
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package org.acme

import io.quarkus.test.junit.QuarkusIntegrationTest

@QuarkusIntegrationTest
class {resource.class-name}IT : {resource.class-name}Test()

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package org.acme

import io.quarkus.test.junit.QuarkusIntegrationTest

@QuarkusIntegrationTest
class {resource.class-name}IT extends {resource.class-name}Test

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package org.acme;

import io.quarkus.test.junit.QuarkusIntegrationTest;

@QuarkusIntegrationTest
public class {resource.class-name}IT extends {resource.class-name}Test {

// Execute the same tests but in native mode.
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package org.acme

import io.quarkus.test.junit.QuarkusIntegrationTest

@QuarkusIntegrationTest
class {resource.class-name}IT : {resource.class-name}Test()

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package org.acme

import io.quarkus.test.junit.QuarkusIntegrationTest

@QuarkusIntegrationTest
class {resource.class-name}IT extends {resource.class-name}Test

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package org.acme;

import io.quarkus.test.junit.QuarkusIntegrationTest;

@QuarkusIntegrationTest
public class {resource.class-name}IT extends {resource.class-name}Test {

// Execute the same tests but in native mode.
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package org.acme

import io.quarkus.test.junit.QuarkusIntegrationTest

@QuarkusIntegrationTest
class {resource.class-name}IT : {resource.class-name}Test()

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package org.acme

import io.quarkus.test.junit.QuarkusIntegrationTest

@QuarkusIntegrationTest
class {resource.class-name}IT extends {resource.class-name}Test
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ void generateRESTEasyJavaCustom(TestInfo testInfo) throws Throwable {
checkConfigProperties(projectDir);

assertThatMatchSnapshot(testInfo, projectDir, "src/main/java/com/andy/BonjourResource.java");
assertThatMatchSnapshot(testInfo, projectDir, "src/test/java/com/andy/NativeBonjourResourceIT.java");
assertThatMatchSnapshot(testInfo, projectDir, "src/test/java/com/andy/BonjourResourceIT.java");
assertThatMatchSnapshot(testInfo, projectDir, "src/main/resources/META-INF/resources/index.html");
}

Expand Down Expand Up @@ -135,9 +135,9 @@ void generateRESTEasyKotlinCustom(TestInfo testInfo) throws Throwable {
.satisfies(checkContains("class BonjourResourceTest"))
.satisfies(checkContains("\"/bonjour\""));

assertThatMatchSnapshot(testInfo, projectDir, "src/test/kotlin/com/andy/NativeBonjourResourceIT.kt")
assertThatMatchSnapshot(testInfo, projectDir, "src/test/kotlin/com/andy/BonjourResourceIT.kt")
.satisfies(checkContains("package com.andy"))
.satisfies(checkContains("class NativeBonjourResourceIT : BonjourResourceTest"));
.satisfies(checkContains("class BonjourResourceIT : BonjourResourceTest"));
}

@Test
Expand Down Expand Up @@ -168,9 +168,9 @@ void generateRESTEasyScalaCustom(TestInfo testInfo) throws Throwable {
.satisfies(checkContains("class BonjourResourceTest"))
.satisfies(checkContains("\"/bonjour\""));

assertThatMatchSnapshot(testInfo, projectDir, "src/test/scala/com/andy/NativeBonjourResourceIT.scala")
assertThatMatchSnapshot(testInfo, projectDir, "src/test/scala/com/andy/BonjourResourceIT.scala")
.satisfies(checkContains("package com.andy"))
.satisfies(checkContains("class NativeBonjourResourceIT extends BonjourResourceTest"));
.satisfies(checkContains("class BonjourResourceIT extends BonjourResourceTest"));
}

@Test
Expand All @@ -188,7 +188,7 @@ void generateMavenDefaultJava(TestInfo testInfo) throws Throwable {

assertThatMatchSnapshot(testInfo, projectDir, "src/main/java/org/acme/GreetingResource.java");
assertThatMatchSnapshot(testInfo, projectDir, "src/test/java/org/acme/GreetingResourceTest.java");
assertThatMatchSnapshot(testInfo, projectDir, "src/test/java/org/acme/NativeGreetingResourceIT.java");
assertThatMatchSnapshot(testInfo, projectDir, "src/test/java/org/acme/GreetingResourceIT.java");
}

@Test
Expand All @@ -207,7 +207,7 @@ void generateMavenResteasyJava(TestInfo testInfo) throws Throwable {

assertThatMatchSnapshot(testInfo, projectDir, "src/main/java/org/acme/GreetingResource.java");
assertThatMatchSnapshot(testInfo, projectDir, "src/test/java/org/acme/GreetingResourceTest.java");
assertThatMatchSnapshot(testInfo, projectDir, "src/test/java/org/acme/NativeGreetingResourceIT.java");
assertThatMatchSnapshot(testInfo, projectDir, "src/test/java/org/acme/GreetingResourceIT.java");
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class RESTEasyCodestartTest {
void testContent() throws Throwable {
codestartTest.checkGeneratedSource("org.acme.GreetingResource");
codestartTest.checkGeneratedTestSource("org.acme.GreetingResourceTest");
codestartTest.checkGeneratedTestSource("org.acme.NativeGreetingResourceIT");
codestartTest.checkGeneratedTestSource("org.acme.GreetingResourceIT");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class RESTEasyReactiveCodestartTest {
void testContent() throws Throwable {
codestartTest.checkGeneratedSource("org.acme.ReactiveGreetingResource");
codestartTest.checkGeneratedTestSource("org.acme.ReactiveGreetingResourceTest");
codestartTest.checkGeneratedTestSource("org.acme.NativeReactiveGreetingResourceIT");
codestartTest.checkGeneratedTestSource("org.acme.ReactiveGreetingResourceIT");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class SpringWebCodestartTest {
void testContent() throws Throwable {
codestartTest.checkGeneratedSource("org.acme.GreetingController");
codestartTest.checkGeneratedTestSource("org.acme.GreetingControllerTest");
codestartTest.checkGeneratedTestSource("org.acme.NativeGreetingControllerIT");
codestartTest.checkGeneratedTestSource("org.acme.GreetingControllerIT");
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package org.acme;

import io.quarkus.test.junit.QuarkusIntegrationTest;

@QuarkusIntegrationTest
public class GreetingResourceIT extends GreetingResourceTest {

// Execute the same tests but in native mode.
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package org.acme;

import io.quarkus.test.junit.QuarkusIntegrationTest;

@QuarkusIntegrationTest
public class GreetingResourceIT extends GreetingResourceTest {

// Execute the same tests but in native mode.
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.andy;

import io.quarkus.test.junit.QuarkusIntegrationTest;

@QuarkusIntegrationTest
public class BonjourResourceIT extends BonjourResourceTest {

// Execute the same tests but in native mode.
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.andy;

import io.quarkus.test.junit.NativeImageTest;
import io.quarkus.test.junit.QuarkusIntegrationTest;

@NativeImageTest
public class NativeBonjourResourceIT extends BonjourResourceTest {
@QuarkusIntegrationTest
public class BonjourResourceIT extends BonjourResourceTest {

// Execute the same tests but in native mode.
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package com.andy

import io.quarkus.test.junit.QuarkusIntegrationTest

@QuarkusIntegrationTest
class BonjourResourceIT : BonjourResourceTest()

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package com.andy

import io.quarkus.test.junit.QuarkusIntegrationTest

@QuarkusIntegrationTest
class BonjourResourceIT extends BonjourResourceTest

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ integration-tests/src/test/java/
integration-tests/src/test/java/org/
integration-tests/src/test/java/org/extension/
integration-tests/src/test/java/org/extension/it/
integration-tests/src/test/java/org/extension/it/MyExtensionResourceIT.java
integration-tests/src/test/java/org/extension/it/MyExtensionResourceTest.java
integration-tests/src/test/java/org/extension/it/NativeMyExtensionResourceIT.java
pom.xml
runtime/
runtime/pom.xml
runtime/src/
runtime/src/main/
runtime/src/main/resources/
runtime/src/main/resources/META-INF/
runtime/src/main/resources/META-INF/quarkus-extension.yaml
runtime/src/main/resources/META-INF/quarkus-extension.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package ilove.quark.us;

import io.quarkus.test.junit.QuarkusIntegrationTest;

@QuarkusIntegrationTest
public class GreetingResourceIT extends GreetingResourceTest {

// Execute the same tests but in native mode.
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package ilove.quark.us

import io.quarkus.test.junit.QuarkusIntegrationTest

@QuarkusIntegrationTest
class GreetingResourceIT : GreetingResourceTest()

This file was deleted.

Loading

0 comments on commit e660187

Please sign in to comment.