Examples of newRealm()


Examples of org.codehaus.plexus.classworlds.ClassWorld.newRealm()

  public void detect_plugins_compiled_for_bad_java_version() throws Exception {
    thrown.expect(SonarException.class);
    thrown.expectMessage("The plugin checkstyle is not supported with Java 1.");

    ClassWorld world = mock(ClassWorld.class);
    when(world.newRealm(anyString(), any(ClassLoader.class))).thenThrow(new UnsupportedClassVersionError());

    classloaders = new PluginClassloaders(getClass().getClassLoader(), world);

    DefaultPluginMetadata checkstyle = DefaultPluginMetadata.create("checkstyle")
      .setMainClass("org.sonar.plugins.checkstyle.CheckstylePlugin")
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.