Search in sources :

Example 1 with TestProfile

use of io.quarkus.test.junit.TestProfile in project quarkus by quarkusio.

the class QuarkusTestProfileAwareClassOrdererTest method quarkusDescriptorMock.

private ClassDescriptor quarkusDescriptorMock(Class<?> testClass, Class<? extends QuarkusTestProfile> profileClass) {
    ClassDescriptor mock = descriptorMock(testClass);
    when(mock.isAnnotated(QuarkusTest.class)).thenReturn(true);
    if (profileClass != null) {
        TestProfile profileMock = Mockito.mock(TestProfile.class);
        doReturn(profileClass).when(profileMock).value();
        when(mock.findAnnotation(TestProfile.class)).thenReturn(Optional.of(profileMock));
    }
    return mock;
}
Also used : ClassDescriptor(org.junit.jupiter.api.ClassDescriptor) QuarkusTestProfile(io.quarkus.test.junit.QuarkusTestProfile) TestProfile(io.quarkus.test.junit.TestProfile)

Aggregations

QuarkusTestProfile (io.quarkus.test.junit.QuarkusTestProfile)1 TestProfile (io.quarkus.test.junit.TestProfile)1 ClassDescriptor (org.junit.jupiter.api.ClassDescriptor)1