/** */
public void testDetachmentOptions() {
int expectedOptions =
FetchPlan.DETACH_LOAD_FIELDS +
FetchPlan.DETACH_UNLOAD_FIELDS;
FetchPlan fp = getPM().getFetchPlan();
int initialOptions = fp.getDetachmentOptions();
if (FetchPlan.DETACH_LOAD_FIELDS != initialOptions) {
failCompare(
"testDetachmentOptions(): wrong getDetachmentOptions() " +
"after getPersistenceManager().",
FetchPlan.DETACH_LOAD_FIELDS, initialOptions);
}
fp.setDetachmentOptions(expectedOptions);
int actualOptions = fp.getDetachmentOptions();
if (expectedOptions != actualOptions) {
failCompare(
"testDetachmentOptions(): wrong getDetachmentOptions() " +
"after setDetachmentOptions().",
expectedOptions, actualOptions);