Search in sources :

Example 1 with WordCountWithAnonymousClass

use of org.apache.flink.runtime.util.jartestprogram.WordCountWithAnonymousClass in project flink by apache.

the class JarFileCreatorTest method TestAnonymousClass.

@Test
public void TestAnonymousClass() throws IOException {
    File out = new File(System.getProperty("java.io.tmpdir"), "jarcreatortest.jar");
    JarFileCreator jfc = new JarFileCreator(out);
    jfc.addClass(WordCountWithAnonymousClass.class).createJarFile();
    Set<String> ans = new HashSet<String>();
    ans.add("org/apache/flink/runtime/util/jartestprogram/StaticData.class");
    ans.add("org/apache/flink/runtime/util/jartestprogram/WordCountWithAnonymousClass.class");
    ans.add("org/apache/flink/runtime/util/jartestprogram/WordCountWithAnonymousClass$1.class");
    Assert.assertTrue("Jar file for Anonymous Class is not correct", validate(ans, out));
    out.delete();
}
Also used : WordCountWithAnonymousClass(org.apache.flink.runtime.util.jartestprogram.WordCountWithAnonymousClass) File(java.io.File) HashSet(java.util.HashSet) Test(org.junit.Test)

Aggregations

File (java.io.File)1 HashSet (java.util.HashSet)1 WordCountWithAnonymousClass (org.apache.flink.runtime.util.jartestprogram.WordCountWithAnonymousClass)1 Test (org.junit.Test)1