@@ -0,0 +1,1024 @@
+package ch.skymarshall.gui.mvc;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0Aimport org.junit.Test;%0A%0Aimport ch.skymarshall.gui.mvc.properties.ObjectProperty;%0A%0Apublic class ModelChildTest %7B%0A%0A%09private static class Parent %7B%0A%0A%09%09String child;%0A%0A%09%09public String getChild() %7B%0A%09%09%09return child;%0A%09%09%7D%0A%0A%09%09public void setChild(final String child) %7B%0A%09%09%09this.child = child;%0A%09%09%7D%0A%0A%09%7D%0A%0A%09@Test%0A%09public void testChildProperty() %7B%0A%0A%09%09final ControllerPropertyChangeSupport propertySupport = new ControllerPropertyChangeSupport(this, false);%0A%09%09final ObjectProperty%3CParent%3E parent = new ObjectProperty%3C%3E(%22parent%22, propertySupport);%0A%09%09final ObjectProperty%3CString%3E child = parent.child(%22child%22, Parent::getChild, Parent::setChild);%0A%09%09propertySupport.attachAll();%0A%0A%09%09final Parent p = new Parent();%0A%09%09p.setChild(%22C1%22);%0A%09%09parent.setValue(this, p);%0A%09%09assertEquals(%22C1%22, child.getValue());%0A%0A%09%09p.setChild(%22C2%22);%0A%09%09parent.forceChanged(this);%0A%09%09assertEquals(%22C2%22, child.getValue());%0A%0A%09%09child.setValue(this, %22C3%22);%0A%09%09assertEquals(%22C3%22, p.getChild());%0A%0A%09%7D%0A%0A%7D%0A

Add TC