472473474475476477478479480481482
tester.clickLink("submitLink"); } public void testTesterCanBeOverridenToNotReuseExistingRequestCycleInExecuteAjaxEvent() { tester = new WicketTester(new MyMockApplication()) { @Override protected WebRequestCycle resolveRequestCycle() { return setupRequestAndResponse(true);
92939495969798
} @Override protected WebApplication newApplication() { return new MyMockApplication(); }
53545556575859
@Override protected void setUp() throws Exception { eventExecuted = false; tester = new WicketTester(new MyMockApplication()); }
50515253545556
private WicketTester tester; protected void setUp() throws Exception { eventExecuted = false; tester = new WicketTester(new MyMockApplication()); }
949596979899100
89909192939495
71727374757677
52535455565758
107108109110111112113114115116117
*/ @Test public void viewBook() throws Exception { Book mockBook = new Book("xxId", "xxName"); Page page = new ViewBook(mockBook); tester.startPage(page); // assertion tester.assertRenderedPage(ViewBook.class); tester.assertLabel("id", "xxId");