[Exmmt-commit] SF.net SVN: exmmt: [36] net.sourceforge.exmmt.test/trunk/src/net/sourceforge/exmmt/b
Status: Inactive
Brought to you by:
lgrammel
|
From: <lgr...@us...> - 2006-06-05 23:33:44
|
Revision: 36 Author: lgrammel Date: 2006-06-05 01:40:32 -0700 (Mon, 05 Jun 2006) ViewCVS: http://svn.sourceforge.net/exmmt/?rev=36&view=rev Log Message: ----------- #1500774 scenario "shopping list" Modified Paths: -------------- net.sourceforge.exmmt.test/trunk/src/net/sourceforge/exmmt/builder/TreeBuilderTest.java Modified: net.sourceforge.exmmt.test/trunk/src/net/sourceforge/exmmt/builder/TreeBuilderTest.java =================================================================== --- net.sourceforge.exmmt.test/trunk/src/net/sourceforge/exmmt/builder/TreeBuilderTest.java 2006-06-05 08:40:25 UTC (rev 35) +++ net.sourceforge.exmmt.test/trunk/src/net/sourceforge/exmmt/builder/TreeBuilderTest.java 2006-06-05 08:40:32 UTC (rev 36) @@ -44,8 +44,33 @@ assertEquals(element, composite.getModel()); assertNotNull(composite.getChildren()); assertEquals(1, composite.getChildren().size()); + + Composite childComposite = composite.getChildren().get(0); + + assertEquals(element.getAttribute("item"), childComposite.getModel()); + assertNotNull(childComposite.getChildren()); + assertEquals(0, childComposite.getChildren().size()); } + + @Test public void buildElementWithChildElement() { + TreeBuilder builder = new TreeBuilder(); + Element listElement = new Element("list"); + Element entryElement = new Element("entry"); + listElement.addContent(entryElement); + + Composite composite = builder.build(listElement); + + assertEquals(listElement, composite.getModel()); + assertNotNull(composite.getChildren()); + assertEquals(1, composite.getChildren().size()); + + Composite childComposite = composite.getChildren().get(0); + assertEquals(entryElement, childComposite.getModel()); + assertNotNull(childComposite.getChildren()); + assertEquals(0, childComposite.getChildren().size()); + } + // Junit 3.8.1 backward compability public static junit.framework.Test suite() { return new JUnit4TestAdapter(TreeBuilderTest.class); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |