-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolve default method in QuarkusTestExtension.
- Loading branch information
Showing
3 changed files
with
122 additions
and
29 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
integration-tests/main/src/test/java/io/quarkus/it/main/DefaultMethodInterface.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package io.quarkus.it.main; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
public interface DefaultMethodInterface { | ||
|
||
@Test | ||
default void doTest() { | ||
} | ||
} |
67 changes: 67 additions & 0 deletions
67
integration-tests/main/src/test/java/io/quarkus/it/main/DefaultMethodTestCase.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
package io.quarkus.it.main; | ||
|
||
import org.junit.jupiter.api.Nested; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import io.quarkus.test.junit.QuarkusTest; | ||
|
||
@QuarkusTest | ||
public class DefaultMethodTestCase implements DefaultMethodInterface { | ||
|
||
@Nested | ||
class NestedTestClass implements DefaultMethodInterface { | ||
} | ||
|
||
interface InnerTestInterface { | ||
@Test | ||
default void testInnerTestInterface() { | ||
|
||
} | ||
} | ||
|
||
@Nested | ||
class InnerTestInterfaceTest implements InnerTestInterface { | ||
|
||
} | ||
|
||
@Nested | ||
class SomeTestInterfaceTest implements DefaultMethodInterface, InnerTestInterface { | ||
|
||
} | ||
|
||
interface NonTestInterface { | ||
default void simpleMethod() { | ||
|
||
} | ||
|
||
void abstractMethod(); | ||
} | ||
|
||
@Nested | ||
class NonTestInterfaceTest implements NonTestInterface { | ||
|
||
@Override | ||
public void abstractMethod() { | ||
|
||
} | ||
} | ||
|
||
interface SuperTestInterface { | ||
@Test | ||
default void superTestMethod() { | ||
|
||
} | ||
} | ||
|
||
interface ChildTestInterface extends SuperTestInterface { | ||
@Test | ||
default void childTestMethod() { | ||
|
||
} | ||
} | ||
|
||
@Nested | ||
class HierarchyTest implements ChildTestInterface { | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters