Support @TestBean
factory methods defined in interfaces
#32943
Labels
Milestone
@TestBean
factory methods defined in interfaces
#32943
Overview
Currently,
@TestBean
factory methods must be defined in the test class or one of its superclasses.However, users may wish to define common factory methods in interfaces that can be shared easily across multiple test classes simply by implementing the necessary interface(s).
Example
Given the following interface...
... the following should be supported:
However, that test class currently fails with an
IllegalStateException
because thecreateTestMessage()
method is not found in the implementedTestBeanFactory
interface.The text was updated successfully, but these errors were encountered: