Example #1
0
 PresentationNodeTest.prototype.test_PrivateMemberVariablesDontHavePathSet = function()
 {
     var oPresentationModel = new RootPresentationNode();
 
     oPresentationModel._$setPath("");
     assertEquals("1a", undefined, oPresentationModel.child.m_oPrivateProperty2.getPath());
     assertEquals("1b", "child", oPresentationModel.child.getPath());
     assertEquals("1c", "child.grandchild", oPresentationModel.child.grandchild.getPath());
 };
Example #2
0
 PresentationNodeTest.prototype.test_paths = function()
 {
     var oPresentationModel = new RootPresentationNode();
     var eTemplate = document.createElement("div");
 
     oPresentationModel._$setPath("");
 
     assertEquals("1a", "", oPresentationModel.getPath());
     assertEquals("1b", "child", oPresentationModel.child.getPath());
     assertEquals("1c", "child.grandchild", oPresentationModel.child.grandchild.getPath());
 };
Example #3
0
 PresentationNodeTest.prototype.test_PropertyPathsAreCleared = function()
 {
     var oPresentationModel = new RootPresentationNode();
     var eTemplate = document.createElement("div");
 
     oPresentationModel._$setPath("");
     assertEquals("1d", "child.grandchild.property4", oPresentationModel.child.grandchild.property4.getPath());
 
     oPresentationModel._$clearPropertiesPath();
 
     assertEquals("1a", undefined, oPresentationModel.property1.getPath());
     assertEquals("1b", undefined, oPresentationModel.child.property2.getPath());
     assertEquals("1c", undefined, oPresentationModel.child.property3.getPath());
     assertEquals("1d", undefined, oPresentationModel.child.grandchild.property4.getPath());
 };
Example #4
0
 PresentationNodeTest.prototype.test_NodePathsAreCleared = function()
 {
     var oPresentationModel = new RootPresentationNode();
 
     oPresentationModel._$setPath("");
     assertEquals("1d", "child.grandchild.property4", oPresentationModel.child.grandchild.property4.getPath());
     assertEquals("1b", "child", oPresentationModel.child.getPath());
     assertEquals("1d", "child.grandchild", oPresentationModel.child.grandchild.getPath());
 
     oPresentationModel._$clearNodePaths();
 
     assertEquals("1a", undefined, oPresentationModel.property1.getPath());
     assertEquals("1b", undefined, oPresentationModel.child.getPath());
     assertEquals("1c", undefined, oPresentationModel.child.property3.getPath());
     assertEquals("1d", undefined, oPresentationModel.child.grandchild.getPath());
 };
Example #5
0
 assertFails("Expected exception for double public reference of same Presentation Node." , function() {
     //When
     oPresentationModel._$setPath("");
 } );