Using the Tapestry 5
PageTester in your unit tests you will need to add a method to shut it down after each test. If you don't you will get this error.
ERROR SerializationSupport -
Setting a new service proxy provider when there's already an existing provider.
This may indicate that you have multiple IoC Registries.
For example.
@Before
public void context() {
pageTester = new PageTester("tapestry","app", "src/main/webapp");
}
@After
public void tearDown() {
pageTester.shutdown();
}
@Test
public void testStartPage() {
startPage = pageTester.renderPage("Start");
assertThat(startPage.getElementById("message").getChildMarkup(), equalTo("Hello"));
}
0 comments:
Post a Comment