@Test
public void testBinding() throws DmcValueException {
Tracker tracker = new Tracker();
TestBasicNamedObjectFixedBinding binding = new TestBasicNamedObjectFixedBinding();
binding.setTracker(tracker);
TestBasicNamedObjectFixedDMO editObject = new TestBasicNamedObjectFixedDMO();
editObject.setName(new StringName("object 1"));
editObject.setSvString("single valued string");
TestBasicObjectFixedDMO obj1 = new TestBasicObjectFixedDMO();
obj1.setSvBoolean(true);
obj1.setSvString("object 1");
editObject.setNthMvIdxUnnamedObj(1, obj1);
binding.setObject(editObject);
binding.getMvIdxUnnamedObj1().showDisplayValue();
// This object is eqivalent to the first object value we set and we shouldn't
// wind up with any modifications from the binding
TestBasicObjectFixedDMO obj2 = new TestBasicObjectFixedDMO();
obj2.setSvBoolean(true);
obj2.setSvString("object 1");
binding.getMvIdxUnnamedObj1().setValue(obj2);
if (binding.getModRec().getModifier().getMVSize() == 0){
System.out.println("No mods 1");
}
else{
System.out.println("Mods occurred 1");
fail("No modifications should have been indicated");
}
TestBasicObjectFixedDMO obj3 = new TestBasicObjectFixedDMO();
obj3.setSvBoolean(true);
obj3.setSvString("object 3");
binding.getMvIdxUnnamedObj1().setValue(obj3);
DmcTypeModifierMV mods = binding.getModRec().getModifier();
if (mods.getMVSize() == 0){
System.out.println("No mods 2");
}
else{
System.out.println("Mods occurred 2");
System.out.println(mods.modifierFormat());
}
////////////////////////////////////////////////////////////////
binding.setObject(editObject);
TestBasicObjectFixedDMO obj4 = new TestBasicObjectFixedDMO();
obj4.setSvBoolean(true);
obj4.setSvString("object 4");
binding.getMvIdxUnnamedObj4().setValue(obj4);
mods = binding.getModRec().getModifier();
if (mods.getMVSize() == 0){
System.out.println("No mods 3");
}
else{