Package mocka.core.annotation
Annotation Interface Mocka
Annotation used to automatically generate mock entity instances
for testing within the Mocka framework.
When applied to a field, this annotation triggers entity creation
using the specified GenerateType. By default, it uses
GenerateType.SELF, which generates only the annotated entity itself
without recursively generating related entities.
Usage Example:
@ExtendsWith(MockaExtension.class)
public class MemberTest {
@Mocka
private Member member; // generates a single Member entity
@Mocka(GenerateType.CHILDREN)
private Recruit recruit; // generates Recruit and its child entities
}
-
Optional Element Summary
Optional Elements
-
Element Details
-
value
GenerateType value- Default:
- SELF
-