Modified: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/MarkupParserTest.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/MarkupParserTest.java?rev=1160061&r1=1160060&r2=1160061&view=diff ============================================================================== --- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/MarkupParserTest.java (original) +++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/MarkupParserTest.java Sun Aug 21 21:01:52 2011 @@ -34,6 +34,7 @@ import org.apache.wicket.util.resource.R import org.apache.wicket.util.resource.locator.IResourceStreamLocator; import org.apache.wicket.util.resource.locator.ResourceStreamLocator; import org.apache.wicket.util.string.StringValueConversionException; +import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -48,21 +49,12 @@ public final class MarkupParserTest exte private static final Logger log = LoggerFactory.getLogger(MarkupParserTest.class); /** - * Construct. - * - * @param name - */ - public MarkupParserTest(String name) - { - super(name); - } - - /** * * @throws StringValueConversionException * @throws Exception */ - public final void testTagParsing() throws Exception + @Test + public void tagParsing() throws Exception { final MarkupParser parser = new MarkupParser( "This is a test <a componentName:id=\"a\" href=\"foo.html\"> <b componentName:id=\"b\">Bold!</b> " @@ -125,7 +117,8 @@ public final class MarkupParserTest exte * * @throws Exception */ - public final void test() throws Exception + @Test + public final void test1() throws Exception { final MarkupParser parser = new MarkupParser( "This is a test <a componentName:id=9> <b>bold</b> <b componentName:id=10></b></a> of the emergency broadcasting system"); @@ -160,7 +153,8 @@ public final class MarkupParserTest exte * * @throws Exception */ - public final void testXhtmlDocument() throws Exception + @Test + public void xhtmlDocument() throws Exception { final String docText = "" + "<?xml version='1.0' encoding='iso-8859-1' ?>" @@ -197,8 +191,8 @@ public final class MarkupParserTest exte * @throws ResourceStreamNotFoundException * @throws IOException */ - public final void testFileDocument() throws ParseException, ResourceStreamNotFoundException, - IOException + @Test + public void fileDocument() throws ParseException, ResourceStreamNotFoundException, IOException { IResourceStreamLocator locator = new ResourceStreamLocator(); MarkupResourceStream resource = newMarkupResourceStream(locator, getClass(), "1", null, @@ -284,8 +278,8 @@ public final class MarkupParserTest exte * @throws ResourceStreamNotFoundException * @throws IOException */ - public final void testWicketTag() throws ParseException, ResourceStreamNotFoundException, - IOException + @Test + public void wicketTag() throws ParseException, ResourceStreamNotFoundException, IOException { WicketTagIdentifier.registerWellKnownTagName("body"); WicketTagIdentifier.registerWellKnownTagName("border"); @@ -349,8 +343,9 @@ public final class MarkupParserTest exte * @throws ResourceStreamNotFoundException * @throws IOException */ - public final void testDefaultWicketTag() throws ParseException, - ResourceStreamNotFoundException, IOException + @Test + public void defaultWicketTag() throws ParseException, ResourceStreamNotFoundException, + IOException { MarkupParser parser = new MarkupParser("<image wcn:id=\"test\"/>"); parser.setWicketNamespace("wcn"); @@ -375,8 +370,8 @@ public final class MarkupParserTest exte * @throws ResourceStreamNotFoundException * @throws IOException */ - public final void testScript() throws ParseException, ResourceStreamNotFoundException, - IOException + @Test + public void script() throws ParseException, ResourceStreamNotFoundException, IOException { final MarkupParser parser = new MarkupParser( "<html wicket:id=\"test\"><script language=\"JavaScript\">... <x a> ...</script></html>"); @@ -393,7 +388,8 @@ public final class MarkupParserTest exte * @throws IOException * @throws ResourceStreamNotFoundException */ - public final void testBalancing() throws IOException, ResourceStreamNotFoundException + @Test + public void balancing() throws IOException, ResourceStreamNotFoundException { final MarkupParser parser = new MarkupParser( "<span wicket:id=\"span\"><img wicket:id=\"img\"><span wicket:id=\"span2\"></span></span>"); @@ -416,7 +412,8 @@ public final class MarkupParserTest exte * @throws IOException * @throws ResourceStreamNotFoundException */ - public final void testComments() throws IOException, ResourceStreamNotFoundException + @Test + public void comments() throws IOException, ResourceStreamNotFoundException { tester.getApplication().getMarkupSettings().setStripComments(true); final MarkupParser parser = new MarkupParser( @@ -433,8 +430,8 @@ public final class MarkupParserTest exte * @throws IOException * @throws ResourceStreamNotFoundException */ - public final void testCommentsWithNestedElements() throws IOException, - ResourceStreamNotFoundException + @Test + public void commentsWithNestedElements() throws IOException, ResourceStreamNotFoundException { tester.getApplication().getMarkupSettings().setStripComments(true); final MarkupParser parser = new MarkupParser( @@ -456,7 +453,8 @@ public final class MarkupParserTest exte * @throws IOException * @throws ResourceStreamNotFoundException */ - public final void testScript1() throws IOException, ResourceStreamNotFoundException + @Test + public void script1() throws IOException, ResourceStreamNotFoundException { IMarkupFragment markup = new MarkupParser("<script/>").parse(); assertEquals(1, markup.size()); @@ -531,7 +529,8 @@ public final class MarkupParserTest exte * @throws ResourceStreamNotFoundException * @throws ParseException */ - public void testParseConditionalComment() throws IOException, ResourceStreamNotFoundException, + @Test + public void parseConditionalComment() throws IOException, ResourceStreamNotFoundException, ParseException { String x = " <!--[if IE]>\r\n" + // @@ -546,7 +545,8 @@ public final class MarkupParserTest exte * @throws IOException * @throws ResourceStreamNotFoundException */ - public void testParseTagToBeExpanded() throws IOException, ResourceStreamNotFoundException + @Test + public void parseTagToBeExpanded() throws IOException, ResourceStreamNotFoundException { String x = "<html xmlns:wicket>\r\n<body>\r\n <span wicket:id=\"myPanel\"/>\r\n</body>\r\n</html>\r\n"; MarkupParser parser = new MarkupParser(x); @@ -560,7 +560,8 @@ public final class MarkupParserTest exte * @throws IOException * @throws ResourceStreamNotFoundException */ - public void testParseBorderSintax() throws IOException, ResourceStreamNotFoundException + @Test + public void parseBorderSintax() throws IOException, ResourceStreamNotFoundException { tester.getApplication().getPageSettings().addComponentResolver(new Border("test_resolver") { @@ -581,7 +582,8 @@ public final class MarkupParserTest exte * @throws IOException * @throws ResourceStreamNotFoundException */ - public void testRawMakupParsingWithStripCommentsSetTrue() throws IOException, + @Test + public void rawMakupParsingWithStripCommentsSetTrue() throws IOException, ResourceStreamNotFoundException { tester.getApplication().getMarkupSettings().setStripComments(true); @@ -594,31 +596,32 @@ public final class MarkupParserTest exte /** * @see <a href="https://issues.apache.org/jira/browse/WICKET-3500">WICKET-3500</a> */ - public void testOpenConditionalCommentPattern() + @Test + public void ppenConditionalCommentPattern() { - assertFalse(MarkupParser.CONDITIONAL_COMMENT_OPENING.matcher("<!--x--> <!--[if IE]>") - .find()); + assertFalse(AbstractMarkupParser.CONDITIONAL_COMMENT_OPENING.matcher( + "<!--x--> <!--[if IE]>").find()); String markup = " <!--[if IE]> <![endif]--><!--[if IE]>--><!--<![endif]--><!--[if IE]><!--><!--<![endif]--><!--[if IE]><! --><!--<![endif]-->"; - Matcher m = MarkupParser.CONDITIONAL_COMMENT_OPENING.matcher(markup); + Matcher m = AbstractMarkupParser.CONDITIONAL_COMMENT_OPENING.matcher(markup); assertTrue(m.find()); assertEquals(" <!--[if IE]>", m.group()); assertFalse(m.find()); markup = " <!--[if IE]>--> <![endif]--><!--[if IE]>--><!--<![endif]--><!--[if IE]><!--><!--<![endif]--><!--[if IE]><! --><!--<![endif]-->"; - m = MarkupParser.CONDITIONAL_COMMENT_OPENING.matcher(markup); + m = AbstractMarkupParser.CONDITIONAL_COMMENT_OPENING.matcher(markup); assertTrue(m.find()); assertEquals(" <!--[if IE]>-->", m.group()); assertFalse(m.find()); markup = " <!--[if IE]><!--> <![endif]--><!--[if IE]>--><!--<![endif]--><!--[if IE]><!--><!--<![endif]--><!--[if IE]><! --><!--<![endif]-->"; - m = MarkupParser.CONDITIONAL_COMMENT_OPENING.matcher(markup); + m = AbstractMarkupParser.CONDITIONAL_COMMENT_OPENING.matcher(markup); assertTrue(m.find()); assertEquals(" <!--[if IE]><!-->", m.group()); assertFalse(m.find()); markup = " <!--[if IE]><! --> <![endif]--><!--[if IE]>--><!--<![endif]--><!--[if IE]><!--><!--<![endif]--><!--[if IE]><! --><!--<![endif]-->"; - m = MarkupParser.CONDITIONAL_COMMENT_OPENING.matcher(markup); + m = AbstractMarkupParser.CONDITIONAL_COMMENT_OPENING.matcher(markup); assertTrue(m.find()); assertEquals(" <!--[if IE]><! -->", m.group()); assertFalse(m.find()); @@ -633,7 +636,8 @@ public final class MarkupParserTest exte * * @throws Exception */ - public void testIEConditionalComments() throws Exception + @Test + public void IEConditionalComments() throws Exception { boolean stripComments = tester.getApplication().getMarkupSettings().getStripComments(); try
Modified: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/RefreshingViewOnRemoveTest.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/RefreshingViewOnRemoveTest.java?rev=1160061&r1=1160060&r2=1160061&view=diff ============================================================================== --- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/RefreshingViewOnRemoveTest.java (original) +++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/RefreshingViewOnRemoveTest.java Sun Aug 21 21:01:52 2011 @@ -33,6 +33,7 @@ import org.apache.wicket.model.IModel; import org.apache.wicket.model.Model; import org.apache.wicket.util.resource.IResourceStream; import org.apache.wicket.util.resource.StringResourceStream; +import org.junit.Test; /** * Tests child's {@link Component#onRemove} is on refresh @@ -47,6 +48,7 @@ public class RefreshingViewOnRemoveTest /** * test() */ + @Test public void test() { tester.startPage(new TestPage()); Modified: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/WicketNamespaceTest.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/WicketNamespaceTest.java?rev=1160061&r1=1160060&r2=1160061&view=diff ============================================================================== --- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/WicketNamespaceTest.java (original) +++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/WicketNamespaceTest.java Sun Aug 21 21:01:52 2011 @@ -17,26 +17,18 @@ package org.apache.wicket.markup; import org.apache.wicket.WicketTestCase; +import org.junit.Test; /** */ public class WicketNamespaceTest extends WicketTestCase { - /** - * Create the test. - * - * @param name - * The test name - */ - public WicketNamespaceTest(String name) - { - super(name); - } /** * @throws Exception */ - public void testRenderHomePage_1() throws Exception + @Test + public void renderHomePage_1() throws Exception { executeTest(WicketNamespace_1.class, "WicketNamespaceExpectedResult_1.html"); } @@ -44,7 +36,8 @@ public class WicketNamespaceTest extends /** * @throws Exception */ - public void testRenderHomePage_2() throws Exception + @Test + public void renderHomePage_2() throws Exception { executeTest(WicketNamespace_2.class, "WicketNamespaceExpectedResult_2.html"); } @@ -52,7 +45,8 @@ public class WicketNamespaceTest extends /** * @throws Exception */ - public void testRenderHomePage_3() throws Exception + @Test + public void renderHomePage_3() throws Exception { executeTest(WicketNamespace_3.class, "WicketNamespaceExpectedResult_3.html"); } @@ -60,7 +54,8 @@ public class WicketNamespaceTest extends /** * @throws Exception */ - public void testRenderHomePage_4() throws Exception + @Test + public void renderHomePage_4() throws Exception { executeTest(WicketNamespace_4.class, "WicketNamespaceExpectedResult_4.html"); } @@ -68,7 +63,8 @@ public class WicketNamespaceTest extends /** * @throws Exception */ - public void testRenderHomePage_5() throws Exception + @Test + public void renderHomePage_5() throws Exception { executeTest(WicketNamespace_5.class, "WicketNamespaceExpectedResult_5.html"); } @@ -76,7 +72,8 @@ public class WicketNamespaceTest extends /** * @throws Exception */ - public void testRenderHomePage_6() throws Exception + @Test + public void renderHomePage_6() throws Exception { executeTest(WicketNamespace_6.class, "WicketNamespaceExpectedResult_6.html"); } @@ -84,7 +81,8 @@ public class WicketNamespaceTest extends /** * @throws Exception */ - public void testDoctype_1() throws Exception + @Test + public void doctype_1() throws Exception { executeTest(Doctype_1.class, "DoctypeExpectedResult_1.html"); MarkupResourceStream rs = MarkupFactory.get() @@ -97,7 +95,8 @@ public class WicketNamespaceTest extends /** * @throws Exception */ - public void testDoctype_InheritedPage() throws Exception + @Test + public void doctype_InheritedPage() throws Exception { executeTest(Doctype_1_InheritedPage.class, "DoctypeExpectedResult_1_Inherited.html"); MarkupResourceStream rs = MarkupFactory.get() @@ -110,7 +109,8 @@ public class WicketNamespaceTest extends /** * @throws Exception */ - public void testDoctype_2() throws Exception + @Test + public void doctype_2() throws Exception { executeTest(Doctype_2.class, "DoctypeExpectedResult_2.html"); MarkupResourceStream rs = MarkupFactory.get() Modified: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/DecoratingHeaderResponseTest.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/DecoratingHeaderResponseTest.java?rev=1160061&r1=1160060&r2=1160061&view=diff ============================================================================== --- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/DecoratingHeaderResponseTest.java (original) +++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/DecoratingHeaderResponseTest.java Sun Aug 21 21:01:52 2011 @@ -34,6 +34,7 @@ import org.apache.wicket.resource.aggreg import org.apache.wicket.util.resource.IResourceStream; import org.apache.wicket.util.resource.ResourceStreamNotFoundException; import org.apache.wicket.util.resource.StringResourceStream; +import org.junit.Test; /** * @author Pedro Santos @@ -48,7 +49,8 @@ public class DecoratingHeaderResponseTes * @throws ResourceStreamNotFoundException * @throws ParseException */ - public void testDecoratedStringPrepend() throws IOException, ResourceStreamNotFoundException, + @Test + public void decoratedStringPrepend() throws IOException, ResourceStreamNotFoundException, ParseException { tester.getApplication().setHeaderResponseDecorator(new IHeaderResponseDecorator() @@ -95,7 +97,8 @@ public class DecoratingHeaderResponseTes * @throws ParseException * */ - public void testEvenOddResourceIdGroup() throws IOException, ResourceStreamNotFoundException, + @Test + public void evenOddResourceIdGroup() throws IOException, ResourceStreamNotFoundException, ParseException { tester.getApplication().setHeaderResponseDecorator(new IHeaderResponseDecorator() Modified: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/MarkupHeadFirstTest.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/MarkupHeadFirstTest.java?rev=1160061&r1=1160060&r2=1160061&view=diff ============================================================================== --- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/MarkupHeadFirstTest.java (original) +++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/MarkupHeadFirstTest.java Sun Aug 21 21:01:52 2011 @@ -23,6 +23,7 @@ import org.apache.wicket.markup.IMarkupR import org.apache.wicket.markup.html.panel.Panel; import org.apache.wicket.util.resource.IResourceStream; import org.apache.wicket.util.resource.StringResourceStream; +import org.junit.Test; /** * <a href="https://issues.apache.org/jira/browse/WICKET-3761">WICKET-3761</a> @@ -40,7 +41,8 @@ public class MarkupHeadFirstTest extends * * @throws Exception */ - public void testRenderMyPage() throws Exception + @Test + public void renderMyPage() throws Exception { executeTest(MarkupHeadFirstPage.class, "MarkupHeadFirstPage.html"); } Modified: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/PackageResourceTest.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/PackageResourceTest.java?rev=1160061&r1=1160060&r2=1160061&view=diff ============================================================================== --- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/PackageResourceTest.java (original) +++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/PackageResourceTest.java Sun Aug 21 21:01:52 2011 @@ -25,6 +25,8 @@ import org.apache.wicket.protocol.http.W import org.apache.wicket.request.resource.PackageResource; import org.apache.wicket.request.resource.PackageResourceReference; import org.apache.wicket.request.resource.ResourceReference; +import org.junit.Before; +import org.junit.Test; /** * Tests for package resources. @@ -40,7 +42,8 @@ public class PackageResourceTest extends * @see junit.framework.TestCase#setUp() */ @Override - protected void setUp() throws Exception + @Before + public void setUp() throws Exception { super.setUp(); application = tester.getApplication(); @@ -51,7 +54,8 @@ public class PackageResourceTest extends * * @throws Exception */ - public void testBindAbsolutePackageResource() throws Exception + @Test + public void bindAbsolutePackageResource() throws Exception { final SharedResources sharedResources = Application.get().getSharedResources(); assertNotNull("resource packaged1.txt should be available as a packaged resource", @@ -63,7 +67,8 @@ public class PackageResourceTest extends * * @throws Exception */ - public void testPackageResourceGuard() throws Exception + @Test + public void packageResourceGuard() throws Exception { PackageResourceGuard guard = new PackageResourceGuard(); assertTrue(guard.acceptExtension("txt")); @@ -84,7 +89,8 @@ public class PackageResourceTest extends * * @throws Exception */ - public void testLenientPackageResourceMatching() throws Exception + @Test + public void lenientPackageResourceMatching() throws Exception { ResourceReference invalidResource = new PackageResourceReference(PackageResourceTest.class, "i_do_not_exist.txt", Locale.ENGLISH, null, null); Modified: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/SecurePackageResourceGuardTest.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/SecurePackageResourceGuardTest.java?rev=1160061&r1=1160060&r2=1160061&view=diff ============================================================================== --- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/SecurePackageResourceGuardTest.java (original) +++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/SecurePackageResourceGuardTest.java Sun Aug 21 21:01:52 2011 @@ -18,6 +18,7 @@ package org.apache.wicket.markup.html; import org.apache.wicket.Application; import org.apache.wicket.WicketTestCase; +import org.junit.Test; /** * @author Juergen Donnerstag @@ -27,7 +28,8 @@ public class SecurePackageResourceGuardT /** * */ - public void test_accept() + @Test + public void accept() { SecurePackageResourceGuard guard = new SecurePackageResourceGuard(); guard.addPattern("+*.gif"); @@ -54,7 +56,8 @@ public class SecurePackageResourceGuardT /** * */ - public void test_acceptAbsolutePath() + @Test + public void acceptAbsolutePath() { SecurePackageResourceGuard guard = new SecurePackageResourceGuard(); guard.addPattern("+*.gif"); @@ -66,7 +69,8 @@ public class SecurePackageResourceGuardT /** * */ - public void test_fileOnly() + @Test + public void fileOnly() { SecurePackageResourceGuard guard = new SecurePackageResourceGuard(); guard.addPattern("+**.gif"); @@ -92,7 +96,8 @@ public class SecurePackageResourceGuardT /** * */ - public void test_withDirectory() + @Test + public void withDirectory() { SecurePackageResourceGuard guard = new SecurePackageResourceGuard(); guard.addPattern("+mydir/*/*.gif"); @@ -107,7 +112,8 @@ public class SecurePackageResourceGuardT /** * */ - public void test_1() + @Test + public void one() { SecurePackageResourceGuard guard = new SecurePackageResourceGuard(); guard.addPattern("+mydir/**/*.gif"); @@ -122,7 +128,8 @@ public class SecurePackageResourceGuardT /** * */ - public void test_2() + @Test + public void two() { SecurePackageResourceGuard guard = new SecurePackageResourceGuard(); guard.addPattern("+*my*dir*/*/*.gif"); @@ -140,7 +147,8 @@ public class SecurePackageResourceGuardT /** * */ - public void test_3() + @Test + public void three() { SecurePackageResourceGuard guard = new SecurePackageResourceGuard(); guard.addPattern("+mydir**/*X/*.gif"); @@ -158,7 +166,8 @@ public class SecurePackageResourceGuardT /** * */ - public void test_4() + @Test + public void four() { SecurePackageResourceGuard guard = new SecurePackageResourceGuard(); guard.addPattern("+mydir/**/xxx/**/*.gif"); @@ -184,7 +193,8 @@ public class SecurePackageResourceGuardT /** * */ - public void test_5() + @Test + public void five() { SecurePackageResourceGuard guard = new SecurePackageResourceGuard(); guard.addPattern("+/**/*.gif"); @@ -200,7 +210,8 @@ public class SecurePackageResourceGuardT /** * */ - public void test_6() + @Test + public void six() { SecurePackageResourceGuard guard = new SecurePackageResourceGuard(); guard.addPattern("+**/*.gif"); @@ -215,7 +226,8 @@ public class SecurePackageResourceGuardT /** * */ - public void test_7() + @Test + public void seven() { SecurePackageResourceGuard guard = new SecurePackageResourceGuard(); guard.addPattern("+*/*.gif"); @@ -230,7 +242,8 @@ public class SecurePackageResourceGuardT /** * */ - public void test_8() + @Test + public void eight() { SecurePackageResourceGuard guard = new SecurePackageResourceGuard(); guard.addPattern("+/*/*.gif"); Modified: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/TransparentWebMarkupContainerTest.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/TransparentWebMarkupContainerTest.java?rev=1160061&r1=1160060&r2=1160061&view=diff ============================================================================== --- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/TransparentWebMarkupContainerTest.java (original) +++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/TransparentWebMarkupContainerTest.java Sun Aug 21 21:01:52 2011 @@ -31,6 +31,7 @@ import org.apache.wicket.util.lang.Wicke import org.apache.wicket.util.resource.IResourceStream; import org.apache.wicket.util.resource.StringResourceStream; import org.apache.wicket.util.tester.WicketTester; +import org.junit.Test; /** * @author Pedro Santos @@ -42,7 +43,8 @@ public class TransparentWebMarkupContain * * @throws Exception */ - public void testMarkupInheritanceResolver() throws Exception + @Test + public void markupInheritanceResolver() throws Exception { executeTest(MarkupInheritanceResolverTestPage3.class, "MarkupInheritanceResolverTestPage_expected.html"); @@ -51,7 +53,8 @@ public class TransparentWebMarkupContain /** * */ - public void testUnableToFindComponents() + @Test + public void unableToFindComponents() { try { @@ -69,7 +72,8 @@ public class TransparentWebMarkupContain * Test if the render is OK even if users define its own component with the same id * WicketTagIdentifier is generation for internal components. */ - public void testUsingGeneratedWicketIdAreSafe1() + @Test + public void usingGeneratedWicketIdAreSafe1() { tester.startPage(TestPage2.class); assertTrue(tester.getLastResponseAsString().contains("test_message")); @@ -79,7 +83,8 @@ public class TransparentWebMarkupContain /** * Same test in different scenario */ - public void testUsingGeneratedWicketIdAreSafe2() + @Test + public void usingGeneratedWicketIdAreSafe2() { tester.startPage(TestPage3.class); String expected = tester.getApplication() @@ -92,7 +97,8 @@ public class TransparentWebMarkupContain /** * Test case for <a href="https://issues.apache.org/jira/browse/WICKET-3719">WICKET-3719</a> */ - public void testAjaxUpdate() + @Test + public void ajaxUpdate() { WicketTester wicketTester = new WicketTester() {
