Re: How to test just a panel using apache wicket?

2011-11-27 Thread kamiseq
well im talking about 1.5.3, and it is not like you startPanel and it
works, as it will try to call constructor with one parameter of the string
type. If your panel has constructor with more than only id then you cant
simply use it.

so i guess this was a case where ITesterPanelSource was useful but now it
is deprecated. And the javadoc says that startComponent should be used
instead but this is not the same functionality and it is quite confusing to
me.

pozdrawiam
Paweł Kamiński

kami...@gmail.com
pkaminski@gmail.com
__


Re: How to test just a panel using apache wicket?

2011-11-27 Thread vineet semwal
ues tester.startcomponentinpage(new myPanel(a,b))

On Sun, Nov 27, 2011 at 4:11 PM, kamiseq kami...@gmail.com wrote:
 well im talking about 1.5.3, and it is not like you startPanel and it
 works, as it will try to call constructor with one parameter of the string
 type. If your panel has constructor with more than only id then you cant
 simply use it.

 so i guess this was a case where ITesterPanelSource was useful but now it
 is deprecated. And the javadoc says that startComponent should be used
 instead but this is not the same functionality and it is quite confusing to
 me.

 pozdrawiam
 Paweł Kamiński

 kami...@gmail.com
 pkaminski@gmail.com
 __




-- 
thank you,

regards,
Vineet Semwal

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How to test just a panel using apache wicket?

2011-11-27 Thread vineet semwal
sorry typo *use* :)

2011/11/27 vineet semwal vineetsemwal1...@gmail.com:
 ues tester.startcomponentinpage(new myPanel(a,b))

 On Sun, Nov 27, 2011 at 4:11 PM, kamiseq kami...@gmail.com wrote:
 well im talking about 1.5.3, and it is not like you startPanel and it
 works, as it will try to call constructor with one parameter of the string
 type. If your panel has constructor with more than only id then you cant
 simply use it.

 so i guess this was a case where ITesterPanelSource was useful but now it
 is deprecated. And the javadoc says that startComponent should be used
 instead but this is not the same functionality and it is quite confusing to
 me.

 pozdrawiam
 Paweł Kamiński

 kami...@gmail.com
 pkaminski@gmail.com
 __




 --
 thank you,

 regards,
 Vineet Semwal




-- 
thank you,

regards,
Vineet Semwal

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How to test just a panel using apache wicket?

2011-11-27 Thread kamiseq
ok I think I was blind yesterday ;] and I need to admit that javadoc is
correct and says exactly the same thing (to use startComponentInPage(C
component)

thanks ;]

pozdrawiam
Paweł Kamiński

kami...@gmail.com
pkaminski@gmail.com
__


Re: How to test just a panel using apache wicket?

2011-11-27 Thread vineet semwal
its not just your fault ,i think tester.startpanel should have been
totally deprecated ie. all overloaded versions of startpanel

On Sun, Nov 27, 2011 at 4:41 PM, kamiseq kami...@gmail.com wrote:
 ok I think I was blind yesterday ;] and I need to admit that javadoc is
 correct and says exactly the same thing (to use startComponentInPage(C
 component)

 thanks ;]

 pozdrawiam
 Paweł Kamiński

 kami...@gmail.com
 pkaminski@gmail.com
 __




-- 
thank you,

regards,
Vineet Semwal

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How to test just a panel using apache wicket?

2011-11-26 Thread kamiseq
for me this does not works either in 1.5.3 as inner test page has no markup

pozdrawiam
Paweł Kamiński

kami...@gmail.com
pkaminski@gmail.com
__





Re: How to test just a panel using apache wicket?

2011-11-26 Thread kamiseq
the javadoc of ITesterPanelSource says Depreced since no longer needed in
1.5.3

can you give examples?

pozdrawiam
Paweł Kamiński

kami...@gmail.com
pkaminski@gmail.com
__


Re: How to test just a panel using apache wicket?

2011-11-26 Thread Igor Vaynberg
tester.startpanel(panel)?

-igor

On Sat, Nov 26, 2011 at 3:57 PM, kamiseq kami...@gmail.com wrote:
 the javadoc of ITesterPanelSource says Depreced since no longer needed in
 1.5.3

 can you give examples?

 pozdrawiam
 Paweł Kamiński

 kami...@gmail.com
 pkaminski@gmail.com
 __


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How to test just a panel using apache wicket?

2011-11-26 Thread sudeivas
I just used tester.startPanel(new xxpanel(x,y));

It worked for me. Make sure that this panel has a .html file associated with
it. Also make sure that you don't have any mock objects for the parent page
or for this panel. Just keep the test case as simple as possible. Let me
know if you still have this issue. Also post your code. 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-test-just-a-panel-using-apache-wicket-tp4097990p4111869.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How to test just a panel using apache wicket?

2011-11-22 Thread sudeivas
Additional Information:

Using Apache-Wicket - 1.5.3

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-test-just-a-panel-using-apache-wicket-tp4097990p4097993.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How to test just a panel using apache wicket?

2011-11-22 Thread Igor Vaynberg
create a simple page that acts as a wrapper for the panel (as an inner
class of the test perhaps) and use that to test

-igor


On Tue, Nov 22, 2011 at 4:11 PM, sudeivas sureshkumar@gmail.com wrote:
 Additional Information:

 Using Apache-Wicket - 1.5.3

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/How-to-test-just-a-panel-using-apache-wicket-tp4097990p4097993.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How to test just a panel using apache wicket?

2011-11-22 Thread sudeivas
I did try something like this,

public class DoublePanelTest {
private WicketTester tester;

private class TestPage extends WebPage {
private static final long serialVersionUID = 1L;
public TestPage() {
super();
add(new DoublePanel(double, leftPanel, rightPanel));
}
}

@Before
public void init() {
tester = new WicketTester();
}

@Test
public void testDoublePanel() {
tester.startPage(new TestPage());
}
}

But still I am getting the same exception,

java.lang.NullPointerException
at org.apache.wicket.Page.isBookmarkable(Page.java:435)
at org.apache.wicket.Page.init(Page.java:734)
at org.apache.wicket.Page.init(Page.java:216)
at org.apache.wicket.Page.init(Page.java:170)
at org.apache.wicket.markup.html.WebPage.init(WebPage.java:74)
at xxx.DoublePanelTest$TestPage.init(DoublePanelTest.java:23)
at xxxDoublePanelTest.testDoublePanel(DoublePanelTest.java:35)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-test-just-a-panel-using-apache-wicket-tp4097990p4098066.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How to test just a panel using apache wicket?

2011-11-22 Thread Igor Vaynberg
open a jira and attach the testcase..

-igor

On Tue, Nov 22, 2011 at 4:40 PM, sudeivas sureshkumar@gmail.com wrote:
 I did try something like this,

 public class DoublePanelTest {
    private WicketTester tester;

    private class TestPage extends WebPage {
        private static final long serialVersionUID = 1L;
        public TestPage() {
            super();
            add(new DoublePanel(double, leftPanel, rightPanel));
        }
    }

    @Before
    public void init() {
        tester = new WicketTester();
    }

    @Test
    public void testDoublePanel() {
        tester.startPage(new TestPage());
    }
 }

 But still I am getting the same exception,

 java.lang.NullPointerException
        at org.apache.wicket.Page.isBookmarkable(Page.java:435)
        at org.apache.wicket.Page.init(Page.java:734)
        at org.apache.wicket.Page.init(Page.java:216)
        at org.apache.wicket.Page.init(Page.java:170)
        at org.apache.wicket.markup.html.WebPage.init(WebPage.java:74)
        at xxx.DoublePanelTest$TestPage.init(DoublePanelTest.java:23)
        at xxxDoublePanelTest.testDoublePanel(DoublePanelTest.java:35)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
 org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
        at
 org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at
 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
        at
 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
        at
 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
        at
 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)



 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/How-to-test-just-a-panel-using-apache-wicket-tp4097990p4098066.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org