You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by iv...@apache.org on 2012/01/01 02:10:29 UTC

git commit: another addition to the enclosure unit test

Updated Branches:
  refs/heads/sandbox/hierarchy-completion ef52f528f -> 8e0b265f9


another addition to the enclosure unit test


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/8e0b265f
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/8e0b265f
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/8e0b265f

Branch: refs/heads/sandbox/hierarchy-completion
Commit: 8e0b265f9ce83cc29583d67987e47f8f122ee445
Parents: ef52f52
Author: Igor Vaynberg <iv...@apache.org>
Authored: Sat Dec 31 17:10:27 2011 -0800
Committer: Igor Vaynberg <iv...@apache.org>
Committed: Sat Dec 31 17:10:27 2011 -0800

----------------------------------------------------------------------
 .../complete/HierarchyCompletionTest.java          |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/8e0b265f/wicket-core/src/test/java/org/apache/wicket/hierarchy/complete/HierarchyCompletionTest.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/test/java/org/apache/wicket/hierarchy/complete/HierarchyCompletionTest.java b/wicket-core/src/test/java/org/apache/wicket/hierarchy/complete/HierarchyCompletionTest.java
index 1efc33d..a8a0fb9 100755
--- a/wicket-core/src/test/java/org/apache/wicket/hierarchy/complete/HierarchyCompletionTest.java
+++ b/wicket-core/src/test/java/org/apache/wicket/hierarchy/complete/HierarchyCompletionTest.java
@@ -382,7 +382,16 @@ public class HierarchyCompletionTest
 		p.setPageMarkup("<form wicket:id='f'><wicket:enclosure child='t'><input wicket:id='t' type='text'/><span wicket:id='l'></span></wicket:enclosure></form>");
 		Form<?> form = new Form<Void>("f");
 		Component t = new TextField<String>("t", new Model<String>());
-		Component l = new Label("l", "label");
+		Component l = new Label("l", "label")
+		{
+			@Override
+			protected void onInitialize()
+			{
+				super.onInitialize();
+				assertThat("in oninitialize the component should be in the correct hierarchy",//
+					getParent(), is(instanceOf(Enclosure.class)));
+			}
+		};
 
 		p.queue(form);
 		form.queue(t, l);