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;
}
Aggregations