/**
 * 
 */
package net.sf.plugfy.verifier.container;

import java.io.File;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.HashMap;

import net.sf.plugfy.verifier.VerificationContext;

import org.apache.bcel.util.ClassLoaderRepository;
import org.apache.bcel.util.Repository;
import org.junit.Test;


/**
 * Tests for verification of directories
 * 
 * @author keunecke
 */
public class DirectoryVerifierTest {

    /**
     * Test of an extracted HIS hotfix
     * 
     * @throws Exception
     */
    @Test
    public void testVerifyWithBrokenHotfixExtracted() throws Exception {
        File file = new File("sample/hotfix/WEB-INF/classes");
        URL url = file.toURI().toURL();
        ClassLoader classLoader = new URLClassLoader(new URL[] { url });
        Repository repository = new ClassLoaderRepository(classLoader);
        VerificationContext context = new VerificationContext(repository, classLoader, url, new HashMap<String, String>(), true);
        new DirectoryVerifier().verify("sample/hotfix/", context);
    }

}

@@ -48,16 +48,104 @@
 ainer;%0A%0A
+import static org.hamcrest.CoreMatchers.is;%0Aimport static org.junit.Assert.assertThat;%0A%0A
 import j
@@ -287,16 +287,66 @@
 Context;
+%0Aimport net.sf.plugfy.verifier.VerificationResult;
 %0A%0Aimport
@@ -1182,16 +1182,220 @@
 ntext);%0A
+        VerificationResult result = context.getResult();%0A        System.out.println(result);%0A        assertThat(result.toString(), is(%22%5BJavaViolation %5BsourceType=TestClassA, requiredType=TestClassB%5D%5D%22));%0A
     %7D%0A%0A%7D

add assertThat to unit test