Author: ivaynberg
Date: Sun Feb 28 04:58:25 2010
New Revision: 917129
URL: http://svn.apache.org/viewvc?rev=917129&view=rev
Log:
test fixes
Added:
wicket/trunk/wicket/src/test/java/org/apache/wicket/properties/MyApplication.java
- copied, changed from r917114,
wicket/trunk/wicket/src/test/java/org/apache/wicket/ajax/MockComponent3.java
wicket/trunk/wicket/src/test/java/org/apache/wicket/properties/MyTesterApplication.java
- copied, changed from r917114,
wicket/trunk/wicket/src/test/java/org/apache/wicket/ajax/MockComponent3.java
Modified:
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/ImageButton.java
wicket/trunk/wicket/src/test/java/org/apache/wicket/CachingDisabledLocalizerTest.java
wicket/trunk/wicket/src/test/java/org/apache/wicket/ajax/DomReadyOrderPage_ajax_expected.html
wicket/trunk/wicket/src/test/java/org/apache/wicket/ajax/DomReadyOrderPage_expected.html
wicket/trunk/wicket/src/test/java/org/apache/wicket/ajax/HomePage.java
wicket/trunk/wicket/src/test/java/org/apache/wicket/ajax/MockComponent3-expected.html
wicket/trunk/wicket/src/test/java/org/apache/wicket/ajax/MockComponent3.html
wicket/trunk/wicket/src/test/java/org/apache/wicket/ajax/MockComponent3.java
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/form/ValidatorPropertiesTest.java
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/form/imagebutton/Home.java
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/form/imagebutton/ImageButtonTest.java
Modified:
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/ImageButton.java
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/ImageButton.java?rev=917129&r1=917128&r2=917129&view=diff
==============================================================================
---
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/ImageButton.java
(original)
+++
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/ImageButton.java
Sun Feb 28 04:58:25 2010
@@ -42,19 +42,6 @@
private final LocalizedImageResource localizedImageResource = new
LocalizedImageResource(this);
/**
- * This constructor can be used if you have an <code>img</code> tag
that has a <code>src</code>
- * that points to a <code>PackageResource</code> (which will be created
and bind to the shared
- * resources) or if you have a <code>value</code> attribute in your tag
for which the image
- * factory can make an image.
- *
- * @see org.apache.wicket.Component#Component(String)
- */
- public ImageButton(final String id)
- {
- super(id);
- }
-
- /**
* Constructs an image button from an image
<code>ResourceReference</code>. That resource
* reference will bind its resource to the current SharedResources.
*
Modified:
wicket/trunk/wicket/src/test/java/org/apache/wicket/CachingDisabledLocalizerTest.java
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/CachingDisabledLocalizerTest.java?rev=917129&r1=917128&r2=917129&view=diff
==============================================================================
---
wicket/trunk/wicket/src/test/java/org/apache/wicket/CachingDisabledLocalizerTest.java
(original)
+++
wicket/trunk/wicket/src/test/java/org/apache/wicket/CachingDisabledLocalizerTest.java
Sun Feb 28 04:58:25 2010
@@ -25,17 +25,6 @@
public class CachingDisabledLocalizerTest extends LocalizerTest
{
/**
- * Create the test case.
- *
- * @param message
- * The test name
- */
- public CachingDisabledLocalizerTest(String message)
- {
- super(message);
- }
-
- /**
*
* @throws Exception
*/
Modified:
wicket/trunk/wicket/src/test/java/org/apache/wicket/ajax/DomReadyOrderPage_ajax_expected.html
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/ajax/DomReadyOrderPage_ajax_expected.html?rev=917129&r1=917128&r2=917129&view=diff
==============================================================================
---
wicket/trunk/wicket/src/test/java/org/apache/wicket/ajax/DomReadyOrderPage_ajax_expected.html
(original)
+++
wicket/trunk/wicket/src/test/java/org/apache/wicket/ajax/DomReadyOrderPage_ajax_expected.html
Sun Feb 28 04:58:25 2010
@@ -1,8 +1,10 @@
-<?xml version="1.0" encoding="UTF-8"?><ajax-response><header-contribution
encoding="wicket1" ><![CDATA[<head
xmlns:wicket="http://wicket.apache.org"><script type="text/javascript"
src="resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js"></script>
-<script type="text/javascript"
src="resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js"></script>
-<script type="text/javascript"
src="resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js"></script>
+<?xml version="1.0" encoding="UTF-8"?><ajax-response><header-contribution
encoding="wicket1" ><![CDATA[<head
xmlns:wicket="http://wicket.apache.org"><script type="text/javascript"
src="resource/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js"></script>
+<script type="text/javascript"
src="resource/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js"></script>
+<script type="text/javascript"
src="resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js"></script>
<script type="text/javascript"
id="wicket-ajax-debug-enable"><!--/*--><![CDATA[/*><!--*/
wicketAjaxDebugEnable=true;
/*-->]^]^>*/</script>
-
-</head>]]></header-contribution><component id="test1" ><![CDATA[<a
href="?wicket:interface=:0:test::ILinkListener::" id="test1" onclick="var
wcall=wicketAjaxGet('?wicket:interface=:0:test::IBehaviorListener:0:-1',null,null,
function() {return Wicket.$('test1') != null;}.bind(this));return
!wcall;">Test</a>]]></component><evaluate><![CDATA[test1();]]></evaluate><evaluate><![CDATA[test2();]]></evaluate></ajax-response>
\ No newline at end of file
+<script type="text/javascript"
id="wicket-ajax-base-url"><!--/*--><![CDATA[/*><!--*/
+Wicket.Ajax.baseUrl="wicket/page?0-1.IBehaviorListener.0-test";
+/*-->]^]^>*/</script>
+</head>]]></header-contribution><component id="test1" ><![CDATA[<a
href="page?0-1.ILinkListener-test" wicket:id="test" id="test1" onclick="var
wcall=wicketAjaxGet('page?0-1.IBehaviorListener.0-test',function() {
}.bind(this),function() { }.bind(this), function() {return Wicket.$('test1') !=
null;}.bind(this));return
!wcall;">Test</a>]]></component><evaluate><![CDATA[test1();]]></evaluate><evaluate><![CDATA[test2();]]></evaluate></ajax-response>
\ No newline at end of file
Modified:
wicket/trunk/wicket/src/test/java/org/apache/wicket/ajax/DomReadyOrderPage_expected.html
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/ajax/DomReadyOrderPage_expected.html?rev=917129&r1=917128&r2=917129&view=diff
==============================================================================
---
wicket/trunk/wicket/src/test/java/org/apache/wicket/ajax/DomReadyOrderPage_expected.html
(original)
+++
wicket/trunk/wicket/src/test/java/org/apache/wicket/ajax/DomReadyOrderPage_expected.html
Sun Feb 28 04:58:25 2010
@@ -1,20 +1,20 @@
<html>
-<head><script type="text/javascript"
src="resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js"></script>
-<script type="text/javascript"
src="resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js"></script>
-<script type="text/javascript"
src="resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js"></script>
+<head><script type="text/javascript"
src="../resource/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js"></script>
+<script type="text/javascript"
src="../resource/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js"></script>
+<script type="text/javascript"
src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js"></script>
<script type="text/javascript"
id="wicket-ajax-debug-enable"><!--/*--><![CDATA[/*><!--*/
wicketAjaxDebugEnable=true;
/*-->]]>*/</script>
-
+<script type="text/javascript"
id="wicket-ajax-base-url"><!--/*--><![CDATA[/*><!--*/
+Wicket.Ajax.baseUrl="wicket/bookmarkable/org.apache.wicket.ajax.DomReadyOrderPage?0";
+/*-->]]>*/</script>
<script type="text/javascript" ><!--/*--><![CDATA[/*><!--*/
Wicket.Event.add(window, "domready", function(event) { test1();;});
/*-->]]>*/</script>
-
<script type="text/javascript" ><!--/*--><![CDATA[/*><!--*/
Wicket.Event.add(window, "domready", function(event) { test2();;});
/*-->]]>*/</script>
-
</head><body>
-<a href="?wicket:interface=:0:test::ILinkListener::" wicket:id="test"
id="test1" onclick="var
wcall=wicketAjaxGet('?wicket:interface=:0:test::IBehaviorListener:0:',null,null,
function() {return Wicket.$('test1') != null;}.bind(this));return
!wcall;">Test</a>
+<a href="../page?0-1.ILinkListener-test" wicket:id="test" id="test1"
onclick="var
wcall=wicketAjaxGet('../page?0-1.IBehaviorListener.0-test',function() {
}.bind(this),function() { }.bind(this), function() {return Wicket.$('test1') !=
null;}.bind(this));return !wcall;">Test</a>
</body>
</html>
\ No newline at end of file
Modified: wicket/trunk/wicket/src/test/java/org/apache/wicket/ajax/HomePage.java
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/ajax/HomePage.java?rev=917129&r1=917128&r2=917129&view=diff
==============================================================================
--- wicket/trunk/wicket/src/test/java/org/apache/wicket/ajax/HomePage.java
(original)
+++ wicket/trunk/wicket/src/test/java/org/apache/wicket/ajax/HomePage.java Sun
Feb 28 04:58:25 2010
@@ -60,14 +60,7 @@
Form<Void> form = new Form<Void>("form")
{
- @Override
- protected void onSubmit()
- {
- if (!continueToOriginalDestination())
- {
- setResponsePage(HomePage.class);
- }
- }
+
};
add(form);
form.add(new TextField<String>("textfield", new
Model<String>()));
Modified:
wicket/trunk/wicket/src/test/java/org/apache/wicket/ajax/MockComponent3-expected.html
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/ajax/MockComponent3-expected.html?rev=917129&r1=917128&r2=917129&view=diff
==============================================================================
---
wicket/trunk/wicket/src/test/java/org/apache/wicket/ajax/MockComponent3-expected.html
(original)
+++
wicket/trunk/wicket/src/test/java/org/apache/wicket/ajax/MockComponent3-expected.html
Sun Feb 28 04:58:25 2010
@@ -1,3 +1,2 @@
-<![CDATA[<head xmlns:wicket="http://wicket.apache.org">
-<link rel="stylesheet" type="text/css"
href="resources/org.apache.wicket.ajax.MockComponent3/mockStyleSheet3.css"/>
+<![CDATA[<head xmlns:wicket="http://wicket.apache.org"><link rel="stylesheet"
type="text/css"
href="resource/org.apache.wicket.ajax.MockComponent3/mockStyleSheet3.css" />
</head>]]>
\ No newline at end of file
Modified:
wicket/trunk/wicket/src/test/java/org/apache/wicket/ajax/MockComponent3.html
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/ajax/MockComponent3.html?rev=917129&r1=917128&r2=917129&view=diff
==============================================================================
---
wicket/trunk/wicket/src/test/java/org/apache/wicket/ajax/MockComponent3.html
(original)
+++
wicket/trunk/wicket/src/test/java/org/apache/wicket/ajax/MockComponent3.html
Sun Feb 28 04:58:25 2010
@@ -4,9 +4,6 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Insert title here</title>
-<wicket:head>
-<link rel="StyleSheet" type="text/css" wicket:id="stylesheet" />
-</wicket:head>
</head>
<body>
<wicket:panel>
Modified:
wicket/trunk/wicket/src/test/java/org/apache/wicket/ajax/MockComponent3.java
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/ajax/MockComponent3.java?rev=917129&r1=917128&r2=917129&view=diff
==============================================================================
---
wicket/trunk/wicket/src/test/java/org/apache/wicket/ajax/MockComponent3.java
(original)
+++
wicket/trunk/wicket/src/test/java/org/apache/wicket/ajax/MockComponent3.java
Sun Feb 28 04:58:25 2010
@@ -16,12 +16,15 @@
*/
package org.apache.wicket.ajax;
+import org.apache.wicket.markup.html.IHeaderContributor;
+import org.apache.wicket.markup.html.IHeaderResponse;
import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.ng.resource.PackageResourceReference;
/**
*
*/
-public class MockComponent3 extends Panel
+public class MockComponent3 extends Panel implements IHeaderContributor
{
private static final long serialVersionUID = 1L;
@@ -34,7 +37,11 @@
public MockComponent3(String id)
{
super(id);
+ }
- add(new StyleSheetReference("stylesheet", MockComponent3.class,
"mockStyleSheet3.css"));
+ public void renderHead(IHeaderResponse response)
+ {
+ response.renderCSSReference(new
PackageResourceReference(MockComponent3.class,
+ "mockStyleSheet3.css"));
}
}
Modified:
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/form/ValidatorPropertiesTest.java
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/form/ValidatorPropertiesTest.java?rev=917129&r1=917128&r2=917129&view=diff
==============================================================================
---
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/form/ValidatorPropertiesTest.java
(original)
+++
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/form/ValidatorPropertiesTest.java
Sun Feb 28 04:58:25 2010
@@ -19,8 +19,11 @@
import java.util.Locale;
import java.util.MissingResourceException;
-import org.apache.wicket.WicketTestCase;
+import junit.framework.TestCase;
+
+import org.apache.wicket.properties.MyApplication;
import org.apache.wicket.properties.TestPage;
+import org.apache.wicket.util.tester.WicketTester;
/**
*
@@ -30,8 +33,24 @@
*
* @author Juergen Donnerstag
*/
-public class ValidatorPropertiesTest extends WicketTestCase
+public class ValidatorPropertiesTest extends TestCase
{
+ private WicketTester tester;
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ tester = new WicketTester(new MyApplication());
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ tester.destroy();
+ super.tearDown();
+ }
+
/**
*
*/
Modified:
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/form/imagebutton/Home.java
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/form/imagebutton/Home.java?rev=917129&r1=917128&r2=917129&view=diff
==============================================================================
---
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/form/imagebutton/Home.java
(original)
+++
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/form/imagebutton/Home.java
Sun Feb 28 04:58:25 2010
@@ -1,110 +1,111 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.wicket.markup.html.form.imagebutton;
-
-import java.util.Locale;
-
-import org.apache.wicket.markup.html.WebPage;
-import org.apache.wicket.markup.html.form.ImageButton;
-import org.apache.wicket.markup.html.link.Link;
-import org.apache.wicket.ng.request.component.PageParameters;
-
-
-/**
- * Demonstrates localization.
- *
- * @author Jonathan Locke
- * @author Eelco Hillenius
- */
-public final class Home extends WebPage
-{
- private static final long serialVersionUID = 1L;
-
- /**
- * Constructor
- *
- * @param parameters
- * Page parameters (ignored since this is the home page)
- */
- public Home(final PageParameters parameters)
- {
- add(new ImageButton("beer"));
-
- // Add a couple of links to be able to play around with the
session
- // locale
- add(new Link("goCanadian")
- {
- private static final long serialVersionUID = 1L;
-
- @Override
- public void onClick()
- {
- getSession().setLocale(Locale.CANADA);
- }
- });
- add(new Link("goUS")
- {
- private static final long serialVersionUID = 1L;
-
- @Override
- public void onClick()
- {
- getSession().setLocale(Locale.US);
- }
- });
- add(new Link("goDutch")
- {
- private static final long serialVersionUID = 1L;
-
- @Override
- public void onClick()
- {
- getSession().setLocale(new Locale("nl", "NL"));
- }
- });
- add(new Link("goGerman")
- {
- private static final long serialVersionUID = 1L;
-
- @Override
- public void onClick()
- {
- getSession().setLocale(new Locale("de", "DE"));
- }
- });
- add(new Link("goChinese")
- {
- private static final long serialVersionUID = 1L;
-
- @Override
- public void onClick()
- {
- getSession().setLocale(new Locale("zh", "CN"));
- }
- });
- add(new Link("goDanish")
- {
- private static final long serialVersionUID = 1L;
-
- @Override
- public void onClick()
- {
- getSession().setLocale(new Locale("da", "DK"));
- }
- });
- }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wicket.markup.html.form.imagebutton;
+
+
+import java.util.Locale;
+
+import org.apache.wicket.markup.html.WebPage;
+import org.apache.wicket.markup.html.form.ImageButton;
+import org.apache.wicket.markup.html.link.Link;
+import org.apache.wicket.ng.request.component.PageParameters;
+import org.apache.wicket.ng.resource.PackageResourceReference;
+
+/**
+ * Demonstrates localization.
+ *
+ * @author Jonathan Locke
+ * @author Eelco Hillenius
+ */
+public final class Home extends WebPage
+{
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Constructor
+ *
+ * @param parameters
+ * Page parameters (ignored since this is the home page)
+ */
+ public Home(final PageParameters parameters)
+ {
+ add(new ImageButton("beer", new
PackageResourceReference(Home.class, "Beer.gif")));
+
+ // Add a couple of links to be able to play around with the
session
+ // locale
+ add(new Link("goCanadian")
+ {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public void onClick()
+ {
+ getSession().setLocale(Locale.CANADA);
+ }
+ });
+ add(new Link("goUS")
+ {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public void onClick()
+ {
+ getSession().setLocale(Locale.US);
+ }
+ });
+ add(new Link("goDutch")
+ {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public void onClick()
+ {
+ getSession().setLocale(new Locale("nl", "NL"));
+ }
+ });
+ add(new Link("goGerman")
+ {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public void onClick()
+ {
+ getSession().setLocale(new Locale("de", "DE"));
+ }
+ });
+ add(new Link("goChinese")
+ {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public void onClick()
+ {
+ getSession().setLocale(new Locale("zh", "CN"));
+ }
+ });
+ add(new Link("goDanish")
+ {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public void onClick()
+ {
+ getSession().setLocale(new Locale("da", "DK"));
+ }
+ });
+ }
+}
Modified:
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/form/imagebutton/ImageButtonTest.java
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/form/imagebutton/ImageButtonTest.java?rev=917129&r1=917128&r2=917129&view=diff
==============================================================================
---
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/form/imagebutton/ImageButtonTest.java
(original)
+++
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/form/imagebutton/ImageButtonTest.java
Sun Feb 28 04:58:25 2010
@@ -1,66 +1,66 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.wicket.markup.html.form.imagebutton;
-
-import java.util.Locale;
-
-import org.apache.wicket.WicketTestCase;
-
-/**
- * @author Juergen Donnerstag
- */
-public class ImageButtonTest extends WicketTestCase
-{
- /**
- * Construct.
- *
- * @param name
- */
- public ImageButtonTest(String name)
- {
- super(name);
- }
-
- /**
- *
- * @throws Exception
- */
- public void test_1() throws Exception
- {
- Locale.setDefault(new Locale("en", "US"));
-
- tester.startPage(Home.class);
-
- tester.clickLink("goCanadian");
-
tester.assertContains("src=\"resources/org.apache.wicket.markup.html.form.imagebutton.Home/Beer_en_CA.gif\"");
-
- tester.clickLink("goChinese");
-
tester.assertContains("src=\"resources/org.apache.wicket.markup.html.form.imagebutton.Home/Beer_zh_CN.gif\"");
-
- tester.clickLink("goDanish");
-
tester.assertContains("src=\"resources/org.apache.wicket.markup.html.form.imagebutton.Home/Beer_da_DK.gif\"");
-
- tester.clickLink("goDutch");
-
tester.assertContains("src=\"resources/org.apache.wicket.markup.html.form.imagebutton.Home/Beer_nl_NL.gif\"");
-
- tester.clickLink("goGerman");
-
tester.assertContains("src=\"resources/org.apache.wicket.markup.html.form.imagebutton.Home/Beer_de_DE.gif\"");
-
- tester.clickLink("goUS");
-
tester.assertContains("src=\"resources/org.apache.wicket.markup.html.form.imagebutton.Home/Beer.gif\"");
- }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wicket.markup.html.form.imagebutton;
+
+import java.util.Locale;
+
+import org.apache.wicket.WicketTestCase;
+
+/**
+ * @author Juergen Donnerstag
+ */
+public class ImageButtonTest extends WicketTestCase
+{
+ /**
+ * Construct.
+ *
+ * @param name
+ */
+ public ImageButtonTest(String name)
+ {
+ super(name);
+ }
+
+ /**
+ *
+ * @throws Exception
+ */
+ public void test_1() throws Exception
+ {
+ Locale.setDefault(new Locale("en", "US"));
+
+ tester.startPage(Home.class);
+
+ tester.clickLink("goCanadian");
+
tester.assertContains("resource/org.apache.wicket.markup.html.form.imagebutton.Home/Beer.gif\\?en_CA\"");
+
+ tester.clickLink("goChinese");
+
tester.assertContains("resource/org.apache.wicket.markup.html.form.imagebutton.Home/Beer.gif\\?zh_CN\"");
+
+ tester.clickLink("goDanish");
+
tester.assertContains("resource/org.apache.wicket.markup.html.form.imagebutton.Home/Beer.gif\\?da_DK\"");
+
+ tester.clickLink("goDutch");
+
tester.assertContains("resource/org.apache.wicket.markup.html.form.imagebutton.Home/Beer.gif\\?nl_NL\"");
+
+ tester.clickLink("goGerman");
+
tester.assertContains("resource/org.apache.wicket.markup.html.form.imagebutton.Home/Beer.gif\\?de_DE\"");
+
+ tester.clickLink("goUS");
+
tester.assertContains("resource/org.apache.wicket.markup.html.form.imagebutton.Home/Beer.gif\"");
+ }
+}
Copied:
wicket/trunk/wicket/src/test/java/org/apache/wicket/properties/MyApplication.java
(from r917114,
wicket/trunk/wicket/src/test/java/org/apache/wicket/ajax/MockComponent3.java)
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/properties/MyApplication.java?p2=wicket/trunk/wicket/src/test/java/org/apache/wicket/properties/MyApplication.java&p1=wicket/trunk/wicket/src/test/java/org/apache/wicket/ajax/MockComponent3.java&r1=917114&r2=917129&rev=917129&view=diff
==============================================================================
---
wicket/trunk/wicket/src/test/java/org/apache/wicket/ajax/MockComponent3.java
(original)
+++
wicket/trunk/wicket/src/test/java/org/apache/wicket/properties/MyApplication.java
Sun Feb 28 04:58:25 2010
@@ -1,40 +1,22 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.wicket.ajax;
-
-import org.apache.wicket.markup.html.panel.Panel;
-
-/**
- *
- */
-public class MockComponent3 extends Panel
-{
- private static final long serialVersionUID = 1L;
-
- /**
- * Construct.
- *
- * @param parent
- * @param id
- */
- public MockComponent3(String id)
- {
- super(id);
-
- add(new StyleSheetReference("stylesheet", MockComponent3.class,
"mockStyleSheet3.css"));
- }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wicket.properties;
+
+public class MyApplication extends MyTesterApplication
+{
+
+}
Copied:
wicket/trunk/wicket/src/test/java/org/apache/wicket/properties/MyTesterApplication.java
(from r917114,
wicket/trunk/wicket/src/test/java/org/apache/wicket/ajax/MockComponent3.java)
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/properties/MyTesterApplication.java?p2=wicket/trunk/wicket/src/test/java/org/apache/wicket/properties/MyTesterApplication.java&p1=wicket/trunk/wicket/src/test/java/org/apache/wicket/ajax/MockComponent3.java&r1=917114&r2=917129&rev=917129&view=diff
==============================================================================
---
wicket/trunk/wicket/src/test/java/org/apache/wicket/ajax/MockComponent3.java
(original)
+++
wicket/trunk/wicket/src/test/java/org/apache/wicket/properties/MyTesterApplication.java
Sun Feb 28 04:58:25 2010
@@ -1,40 +1,24 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.wicket.ajax;
-
-import org.apache.wicket.markup.html.panel.Panel;
-
-/**
- *
- */
-public class MockComponent3 extends Panel
-{
- private static final long serialVersionUID = 1L;
-
- /**
- * Construct.
- *
- * @param parent
- * @param id
- */
- public MockComponent3(String id)
- {
- super(id);
-
- add(new StyleSheetReference("stylesheet", MockComponent3.class,
"mockStyleSheet3.css"));
- }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wicket.properties;
+
+import org.apache.wicket.ng.mock.MockApplication;
+
+public class MyTesterApplication extends MockApplication
+{
+
+}