Open
Description
When I use the Approvals Libary with the TestTemplate Option, like:
@TestTemplate @ExtendWith(UserIdGeneratorTestInvocationContextProvider.class) public void whenUserIdRequested_thenUserIdIsReturnedInCorrectFormat(UserIdGeneratorTestCase testCase) { UserIdGenerator userIdGenerator = new UserIdGeneratorImpl(testCase.isFeatureEnabled()); String actualUserId = userIdGenerator.generate(testCase.getFirstName(), testCase.getLastName()); Assertions.assertEquals(actualUserId, testCase.getExpectedUserId()); Approvals.verify(actualUserId); }
It throws the error:
java.lang.RuntimeException: Could not find Junit/TestNg TestCase you are running, supported frameworks: Junit3, Junit4, Junit5, TestNg
The problem is in the function:
org.approvaltests.namer.AttributeStackSelector > AttributeStackSelector (Class is not TestCase when using @testtemplate)
Is there a possibility to use the libary with @testtemplate?