[jboss-dev-forums] [JBoss Microcontainer Development] - Re: Testing Deployers with new Reflect + ClassPool
flavia.rainone@jboss.com
do-not-reply at jboss.com
Fri Dec 4 08:50:41 EST 2009
"alesj" wrote : "flavia.rainone at jboss.com" wrote :
| | That error is fully expected as the classes belonging to the excluded package must be excluded from the classpath during test execution :-)
| |
| I guess you now do this explicitly in maven?
|
| You should do it programatically,
| the same way we do it in our CL, Deployers, Weld, ... tests.
I added to the deployers-vfs tests the same check that generated the failure you saw on the classpool tests:
ClassLoaderSystem system = (ClassLoaderSystem) getBean("ClassLoaderSystem");
| ClassLoaderDomain domain = system.getDefaultDomain();
| try{
| Class<?> clazz = domain.loadClass(JsfBean.class.getName());
| Assert.fail("Should not have been able to load " + JsfBean.class.getName());
| } catch(Exception expected) {}
And it failed. How can I make this work programatically?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4269011#4269011
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4269011
More information about the jboss-dev-forums
mailing list