*
* (test class will be suplied by transformed asserions)
*/
@Override
public void process(TestDeployment testDeployment, Archive<?> protocolArchive) {
TestClass testClass = this.testClass.get();
if (testClass.isAnnotationPresent(WarpTest.class)) {
Archive<?> applicationArchive = testDeployment.getApplicationArchive();
List<ArchivePath> classPathsToRemove = new LinkedList<ArchivePath>();
for (ArchivePath archivePath : applicationArchive.getContent().keySet()) {
String path = archivePath.get();
String classPath = testClass.getName().replace(".", "/");
// remove TestClass and its anonymous classes - do not remove static inner classes
if (path.matches("/WEB-INF/classes/" + classPath + "(\\$[0-9]*)?\\.class")) {
classPathsToRemove.add(archivePath);
}
}