Search in sources :

Example 1 with RelationshipHelper

use of org.apache.cayenne.testdo.relationships.RelationshipHelper in project cayenne by apache.

the class MeaningfulFKIT method testValidateForSave2.

@Test
public void testValidateForSave2() throws Exception {
    MeaningfulFK testObject = context.newObject(MeaningfulFK.class);
    RelationshipHelper related = testObject.getObjectContext().newObject(RelationshipHelper.class);
    testObject.setToRelationshipHelper(related);
    ValidationResult validation = new ValidationResult();
    testObject.validateForSave(validation);
    assertFalse(validation.hasFailures());
}
Also used : MeaningfulFK(org.apache.cayenne.testdo.relationships.MeaningfulFK) RelationshipHelper(org.apache.cayenne.testdo.relationships.RelationshipHelper) ValidationResult(org.apache.cayenne.validation.ValidationResult) Test(org.junit.Test)

Aggregations

MeaningfulFK (org.apache.cayenne.testdo.relationships.MeaningfulFK)1 RelationshipHelper (org.apache.cayenne.testdo.relationships.RelationshipHelper)1 ValidationResult (org.apache.cayenne.validation.ValidationResult)1 Test (org.junit.Test)1