use of org.eclipse.persistence.exceptions.IntegrityChecker in project eclipselink by eclipse-ee4j.
the class BidirectionWithHashtableTest method test.
@Override
public void test() {
try {
getSession().setIntegrityChecker(new IntegrityChecker());
getSession().getIntegrityChecker().dontCatchExceptions();
((DatabaseSession) getSession()).addDescriptor(descriptor());
} catch (EclipseLinkException exception) {
caughtException = exception;
}
}
use of org.eclipse.persistence.exceptions.IntegrityChecker in project eclipselink by eclipse-ee4j.
the class ForeignKeysDefinedIncorrectlyTest method test.
@Override
public void test() {
try {
getSession().setIntegrityChecker(new IntegrityChecker());
getSession().getIntegrityChecker().dontCatchExceptions();
((DatabaseSession) getSession()).addDescriptor(descriptor());
} catch (EclipseLinkException exception) {
caughtException = exception;
}
}
use of org.eclipse.persistence.exceptions.IntegrityChecker in project eclipselink by eclipse-ee4j.
the class GetMethodReturnTypeNotValidTest method setup.
@Override
protected void setup() {
expectedException = DescriptorException.getMethodReturnTypeNotValid(new OneToManyMapping());
orgIntegrityChecker = getSession().getIntegrityChecker();
getSession().setIntegrityChecker(new IntegrityChecker());
getSession().getIntegrityChecker().dontCatchExceptions();
}
use of org.eclipse.persistence.exceptions.IntegrityChecker in project eclipselink by eclipse-ee4j.
the class GetMethodReturnsValueHolderTest method test.
@Override
public void test() {
try {
getSession().setIntegrityChecker(new IntegrityChecker());
getSession().getIntegrityChecker().dontCatchExceptions();
((DatabaseSession) getSession()).addDescriptor(descriptor());
} catch (EclipseLinkException exception) {
caughtException = exception;
}
}
use of org.eclipse.persistence.exceptions.IntegrityChecker in project eclipselink by eclipse-ee4j.
the class IllegalArgumentWhileGettingValueThruInstanceVariableAccessorTest method test.
@Override
public void test() {
org.eclipse.persistence.testing.tests.validation.PersonInstanceAccess person = new org.eclipse.persistence.testing.tests.validation.PersonInstanceAccess();
person.setName("Person");
Address address = new Address();
try {
getSession().setIntegrityChecker(new IntegrityChecker());
getSession().getIntegrityChecker().dontCatchExceptions();
((DatabaseSession) getSession()).addDescriptor(descriptor());
UnitOfWork uow = getSession().acquireUnitOfWork();
uow.registerObject(person);
uow.commit();
DatabaseMapping dMapping = descriptor().getMappingForAttributeName("p_name");
DatabaseMapping idMapping = descriptor().getMappingForAttributeName("p_id");
dMapping.getAttributeAccessor().initializeAttributes(org.eclipse.persistence.testing.tests.validation.PersonInstanceAccess.class);
dMapping.getAttributeAccessor().initializeAttributes(org.eclipse.persistence.testing.tests.validation.PersonInstanceAccess.class);
dMapping.getAttributeValueFromObject(address);
} catch (EclipseLinkException exception) {
caughtException = exception;
}
}
Aggregations