You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by jd...@apache.org on 2008/08/24 09:50:09 UTC

svn commit: r688461 - in /wicket/trunk/wicket/src/test/java/org/apache/wicket: ./ markup/html/basic/ markup/html/form/

Author: jdonnerstag
Date: Sun Aug 24 00:50:09 2008
New Revision: 688461

URL: http://svn.apache.org/viewvc?rev=688461&view=rev
Log:
wicket-1796: allow for other file extension for xml properties files to avoid conflicts with XML markup files

Modified:
    wicket/trunk/wicket/src/test/java/org/apache/wicket/LocalizerTest.java
    wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPageExpectedResult_1.xml
    wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPageExpectedResult_2.xml
    wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPageExpectedResult_3.xml
    wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_1.xml
    wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_2.xml
    wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_3.xml
    wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/form/ValidatorPropertiesTest.java

Modified: wicket/trunk/wicket/src/test/java/org/apache/wicket/LocalizerTest.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/LocalizerTest.java?rev=688461&r1=688460&r2=688461&view=diff
==============================================================================
--- wicket/trunk/wicket/src/test/java/org/apache/wicket/LocalizerTest.java (original)
+++ wicket/trunk/wicket/src/test/java/org/apache/wicket/LocalizerTest.java Sun Aug 24 00:50:09 2008
@@ -86,6 +86,7 @@
 	 * 
 	 * @throws Exception
 	 */
+	@Override
 	protected void setUp() throws Exception
 	{
 		tester = new WicketTester(new DummyApplication());
@@ -121,7 +122,7 @@
 		settings.setThrowExceptionOnMissingResource(false);
 
 		Assert.assertEquals("Wrapped key should be returned on no default",
-			"[Warning: String resource for 'unknown.string' not found]", localizer.getString(
+			"[Warning: Property for 'unknown.string' not found]", localizer.getString(
 				"unknown.string", null, null, null));
 	}
 
@@ -133,7 +134,7 @@
 		settings.setUseDefaultOnMissingResource(false);
 		settings.setThrowExceptionOnMissingResource(false);
 		Assert.assertEquals("Wrapped key should be returned on not using default and no exception",
-			"[Warning: String resource for 'unknown.string' not found]", localizer.getString(
+			"[Warning: Property for 'unknown.string' not found]", localizer.getString(
 				"unknown.string", null, null, "DEFAULT"));
 	}
 

Modified: wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPageExpectedResult_1.xml
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPageExpectedResult_1.xml?rev=688461&r1=688460&r2=688461&view=diff
==============================================================================
--- wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPageExpectedResult_1.xml (original)
+++ wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPageExpectedResult_1.xml Sun Aug 24 00:50:09 2008
@@ -1,17 +1,19 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-    ====================================================================
-    Licensed 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
+   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
+        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.
+   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.
 -->
 <root>
   <order>

Modified: wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPageExpectedResult_2.xml
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPageExpectedResult_2.xml?rev=688461&r1=688460&r2=688461&view=diff
==============================================================================
--- wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPageExpectedResult_2.xml (original)
+++ wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPageExpectedResult_2.xml Sun Aug 24 00:50:09 2008
@@ -1,17 +1,19 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-    ====================================================================
-    Licensed 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
+   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
+        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.
+   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.
 -->
 <root>
   <order>

Modified: wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPageExpectedResult_3.xml
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPageExpectedResult_3.xml?rev=688461&r1=688460&r2=688461&view=diff
==============================================================================
--- wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPageExpectedResult_3.xml (original)
+++ wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPageExpectedResult_3.xml Sun Aug 24 00:50:09 2008
@@ -1,17 +1,19 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-    ====================================================================
-    Licensed 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
+   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
+        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.
+   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.
 -->
 <root>
   <order>

Modified: wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_1.xml
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_1.xml?rev=688461&r1=688460&r2=688461&view=diff
==============================================================================
--- wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_1.xml (original)
+++ wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_1.xml Sun Aug 24 00:50:09 2008
@@ -1,17 +1,19 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-    ====================================================================
-    Licensed 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
+   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
+        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.
+   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.
 -->
 <root>
   <order>

Modified: wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_2.xml
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_2.xml?rev=688461&r1=688460&r2=688461&view=diff
==============================================================================
--- wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_2.xml (original)
+++ wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_2.xml Sun Aug 24 00:50:09 2008
@@ -1,17 +1,19 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-    ====================================================================
-    Licensed 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
+   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
+        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.
+   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.
 -->
 <root>
   <order>

Modified: wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_3.xml
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_3.xml?rev=688461&r1=688460&r2=688461&view=diff
==============================================================================
--- wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_3.xml (original)
+++ wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_3.xml Sun Aug 24 00:50:09 2008
@@ -1,17 +1,19 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-    ====================================================================
-    Licensed 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
+   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
+        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.
+   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.
 -->
 <root>
   <order>

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=688461&r1=688460&r2=688461&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 Aug 24 00:50:09 2008
@@ -34,11 +34,13 @@
 {
 	WicketTester tester;
 
+	@Override
 	protected void setUp() throws Exception
 	{
 		tester = new WicketTester(new MyTesterApplication());
 	}
 
+	@Override
 	protected void tearDown() throws Exception
 	{
 		tester.destroy();
@@ -84,34 +86,60 @@
 		page.getText12().setInput("");
 		page.getText12().validateRequired();
 
-		assertEquals("text1label is required", page.getText1().getFeedbackMessage().getMessage()
-				.toString());
-		assertEquals("text2 is required", page.getText2().getFeedbackMessage().getMessage()
-				.toString());
-		assertEquals("ok: text3333 is missing", page.getText3().getFeedbackMessage().getMessage()
-				.toString());
-		assertEquals("ok: Text4Label is missing", page.getText4().getFeedbackMessage().getMessage()
-				.toString());
-		assertEquals("ok: text is missing", page.getText5().getFeedbackMessage().getMessage()
-				.toString());
-		assertEquals("Default message: text6 required", page.getText6().getFeedbackMessage()
-				.getMessage().toString());
-		assertEquals("input for text7-Label is missing", page.getText7().getFeedbackMessage()
-				.getMessage().toString());
-		assertEquals("Default message: text8-Label required", page.getText8().getFeedbackMessage()
-				.getMessage().toString());
-		assertEquals("found it in panel", page.getText9().getFeedbackMessage().getMessage()
-				.toString());
-		assertEquals("found it in form", page.getText10().getFeedbackMessage().getMessage()
-				.toString());
-		assertEquals("found it in page", page.getText11().getFeedbackMessage().getMessage()
-				.toString());
-		assertEquals("found it in page", page.getText12().getFeedbackMessage().getMessage()
-				.toString());
+		assertEquals("text1label is required", page.getText1()
+			.getFeedbackMessage()
+			.getMessage()
+			.toString());
+		assertEquals("text2 is required", page.getText2()
+			.getFeedbackMessage()
+			.getMessage()
+			.toString());
+		assertEquals("ok: text3333 is missing", page.getText3()
+			.getFeedbackMessage()
+			.getMessage()
+			.toString());
+		assertEquals("ok: Text4Label is missing", page.getText4()
+			.getFeedbackMessage()
+			.getMessage()
+			.toString());
+		assertEquals("ok: text is missing", page.getText5()
+			.getFeedbackMessage()
+			.getMessage()
+			.toString());
+		assertEquals("Default message: text6 required", page.getText6()
+			.getFeedbackMessage()
+			.getMessage()
+			.toString());
+		assertEquals("input for text7-Label is missing", page.getText7()
+			.getFeedbackMessage()
+			.getMessage()
+			.toString());
+		assertEquals("Default message: text8-Label required", page.getText8()
+			.getFeedbackMessage()
+			.getMessage()
+			.toString());
+		assertEquals("found it in panel", page.getText9()
+			.getFeedbackMessage()
+			.getMessage()
+			.toString());
+		assertEquals("found it in form", page.getText10()
+			.getFeedbackMessage()
+			.getMessage()
+			.toString());
+		assertEquals("found it in page", page.getText11()
+			.getFeedbackMessage()
+			.getMessage()
+			.toString());
+		assertEquals("found it in page", page.getText12()
+			.getFeedbackMessage()
+			.getMessage()
+			.toString());
 
 		// Test caching
-		assertEquals("Default message: text8-Label required", page.getText8().getFeedbackMessage()
-				.getMessage().toString());
+		assertEquals("Default message: text8-Label required", page.getText8()
+			.getFeedbackMessage()
+			.getMessage()
+			.toString());
 
 		// now test Dutch
 
@@ -145,33 +173,57 @@
 		page.getText12().setInput("");
 		page.getText12().validateRequired();
 
-		assertEquals("text1label is verplicht", page.getText1().getFeedbackMessage().getMessage()
-				.toString());
-		assertEquals("text2 is verplicht", page.getText2().getFeedbackMessage().getMessage()
-				.toString());
-		assertEquals("ok: text3333 mist", page.getText3().getFeedbackMessage().getMessage()
-				.toString());
-		assertEquals("ok: Text4Label mist", page.getText4().getFeedbackMessage().getMessage()
-				.toString());
+		assertEquals("text1label is verplicht", page.getText1()
+			.getFeedbackMessage()
+			.getMessage()
+			.toString());
+		assertEquals("text2 is verplicht", page.getText2()
+			.getFeedbackMessage()
+			.getMessage()
+			.toString());
+		assertEquals("ok: text3333 mist", page.getText3()
+			.getFeedbackMessage()
+			.getMessage()
+			.toString());
+		assertEquals("ok: Text4Label mist", page.getText4()
+			.getFeedbackMessage()
+			.getMessage()
+			.toString());
 		assertEquals("ok: text mist", page.getText5().getFeedbackMessage().getMessage().toString());
-		assertEquals("Default message: text6 verplicht", page.getText6().getFeedbackMessage()
-				.getMessage().toString());
-		assertEquals("input for text7-Label mist", page.getText7().getFeedbackMessage()
-				.getMessage().toString());
-		assertEquals("Default message: text8-Label verplicht", page.getText8().getFeedbackMessage()
-				.getMessage().toString());
-		assertEquals("gevonden in panel", page.getText9().getFeedbackMessage().getMessage()
-				.toString());
-		assertEquals("gevonden in form", page.getText10().getFeedbackMessage().getMessage()
-				.toString());
-		assertEquals("gevonden in page", page.getText11().getFeedbackMessage().getMessage()
-				.toString());
-		assertEquals("gevonden in page", page.getText12().getFeedbackMessage().getMessage()
-				.toString());
+		assertEquals("Default message: text6 verplicht", page.getText6()
+			.getFeedbackMessage()
+			.getMessage()
+			.toString());
+		assertEquals("input for text7-Label mist", page.getText7()
+			.getFeedbackMessage()
+			.getMessage()
+			.toString());
+		assertEquals("Default message: text8-Label verplicht", page.getText8()
+			.getFeedbackMessage()
+			.getMessage()
+			.toString());
+		assertEquals("gevonden in panel", page.getText9()
+			.getFeedbackMessage()
+			.getMessage()
+			.toString());
+		assertEquals("gevonden in form", page.getText10()
+			.getFeedbackMessage()
+			.getMessage()
+			.toString());
+		assertEquals("gevonden in page", page.getText11()
+			.getFeedbackMessage()
+			.getMessage()
+			.toString());
+		assertEquals("gevonden in page", page.getText12()
+			.getFeedbackMessage()
+			.getMessage()
+			.toString());
 
 		// Test caching
-		assertEquals("Default message: text8-Label verplicht", page.getText8().getFeedbackMessage()
-				.getMessage().toString());
+		assertEquals("Default message: text8-Label verplicht", page.getText8()
+			.getFeedbackMessage()
+			.getMessage()
+			.toString());
 	}
 
 	/**
@@ -184,8 +236,8 @@
 		WebRequestCycle cycle = tester.createRequestCycle();
 
 		String str = tester.getApplication().getResourceSettings().getLocalizer().getString("XXX",
-				null);
-		assertEquals("[Warning: String resource for 'XXX' not found]", str);
+			null);
+		assertEquals("[Warning: Property for 'XXX' not found]", str);
 	}
 
 	/**