public class ApacheTestFixture { private static final String orgUrlApache = "http://www.apache.org"; private static final String projUrlLog4j = "http://logging.apache.org/"; public static final String log4jJar = "log4j-1.2.16.jar"; public static final Map<String, Object> orgLog4J = Maps.<String, Object>makeMap( // organisationNameKey, "The Apache Software Foundation", // organisationUrlKey, orgUrlApache, // descriptionKey, "Provides support for the Apache community of open-source software projects."); public static final Map<String, Object> projLog4J = Maps.<String, Object>makeMap( // organisationUrlKey, orgUrlApache, // projectUrlKey, projUrlLog4j, // descriptionKey, "The Apache Logging Services Project creates and maintains open-source software related to the logging of application behavior and released at no charge to the public."); public static final JarDataAndPath jarLog4J1_2_16 = new JarDataAndPath( log4jJar, ApacheTestFixture.class, // organisationUrlKey, orgUrlApache, // projectUrlKey, projUrlLog4j, // descriptionKey, "", // javadocKey, "http://repo1.maven.org/maven2/log4j/log4j/1.2.16/log4j-1.2.16-javadoc.jar", // sourceKey, "http://repo1.maven.org/maven2/log4j/log4j/1.2.16/log4j-1.2.16-sources.jar"); public static final IBinding Method_AppenderSkeleton_doAppend = IBindingBuilder.Utils. // parent(log4jJar, ApacheTestFixture.class) .withPackage("org.apache.log4j ") .withClass("AppenderSkeleton") . // child() .withMethod("doAppend"); public static final IBinding Method_AppenderSkeleton_Append = IBindingBuilder.Utils. // parent(log4jJar, ApacheTestFixture.class) .withPackage("org.apache.log4j ") .withClass("AppenderSkeleton") . // child() .withMethod("append"); public static final IBinding LocalVariable_AppenderSkeleton_headFilter = IBindingBuilder.Utils. // parent(log4jJar, ApacheTestFixture.class) .withPackage("org.apache.log4j ") .withClass("AppenderSkeleton") . // child() .withLocalVariable("headFilter"); }
public JarDataAndPath(String jarPath, Class<?> anchor, Object... namesAndValues) { this.data = Maps.<String, Object>makeMap(namesAndValues); this.jar = new ClassPathResource(jarPath, anchor); try { Assert.assertTrue(jar.getFile().exists()); } catch (IOException e) { throw WrappedException.wrap(e); } }