assertEquals( "Dispatcher servlet incorrect for test portlet [" + testPortletName + "]", Assembler.DISPATCH_SERVLET_CLASS, servlet.getServletClass() );
}
protected void verifyAssembly( File warFile ) throws Exception {
WebAppDescriptorService webSvc = new WebAppDescriptorServiceImpl();
PortletAppDescriptorService portletSvc = new PortletAppDescriptorServiceImpl();
int entryCount = 0;
ByteArrayOutputStream portletXmlBytes = new ByteArrayOutputStream();
ByteArrayOutputStream webXmlBytes = new ByteArrayOutputStream();
WebAppDD webApp = null;
PortletAppDD portletApp = null;
JarInputStream assembledWarIn = new JarInputStream( new FileInputStream( warFile ) );
JarEntry tempEntry;
while ( ( tempEntry = assembledWarIn.getNextJarEntry() ) != null ) {
entryCount++;
if ( Assembler.PORTLET_XML.equals( tempEntry.getName() ) ) {
IOUtils.copy( assembledWarIn, portletXmlBytes );
portletApp = portletSvc.read( new ByteArrayInputStream( portletXmlBytes.toByteArray() ) );
}
if ( Assembler.SERVLET_XML.equals( tempEntry.getName() ) ) {
IOUtils.copy( assembledWarIn, webXmlBytes );
webApp = webSvc.read( new ByteArrayInputStream( webXmlBytes.toByteArray() ) );
}