Class Fixture

java.lang.Object
com.axelor.test.fixture.Fixture

public class Fixture extends Object
Fixture class to load YAML fixtures for JPA entities.

This class reads YAML files from the classpath, maps them to Java objects, and allows for persistence of those objects.

Example YAML fixture:

 - type: Country
   key: country:france
   properties:
     name: France
     code: FR

 - type: Country
   key: country:usa
   properties:
       name: United States
       code: US

 - type: Address
   key: address:home
   properties:
       street: 123 Main St
       city: Paris
       postalCode: 75001
       country: country:france

 - type: Address
   key: address:work
   properties:
       street: 456 Elm St
       city: New York
       postalCode: 10001
       country: country:usa

 - type: Person
   key: person:john_doe
   properties:
     firstName: John
     lastName: Doe
     email: john.doe@example.com
     addresses:
       - address:home
       - address:work