use of io.quarkus.test.common.QuarkusTestResource in project quarkus by quarkusio.
the class QuarkusTestProfileAwareClassOrdererTest method quarkusDescriptorMock.
private ClassDescriptor quarkusDescriptorMock(Class<?> testClass, Class<? extends QuarkusTestResourceLifecycleManager> managerClass, boolean restrictToAnnotatedClass) {
ClassDescriptor mock = descriptorMock(testClass);
when(mock.isAnnotated(QuarkusTest.class)).thenReturn(true);
QuarkusTestResource resourceMock = Mockito.mock(QuarkusTestResource.class, withSettings().lenient());
doReturn(managerClass).when(resourceMock).value();
when(resourceMock.restrictToAnnotatedClass()).thenReturn(restrictToAnnotatedClass);
when(mock.findRepeatableAnnotations(QuarkusTestResource.class)).thenReturn(List.of(resourceMock));
return mock;
}
Aggregations