Package javax.tools.diagnostics

Examples of javax.tools.diagnostics.FactoryRegistry


   
  }
 
  public void testHasAtLeastOneFactory() {
   
    FactoryRegistry defaultRegistry=FactoryRegistry.getDefaultRegistry();
    ImageFactory[] factories=defaultRegistry.getFactories();
    assertNotNull(factories);
    assertTrue("no factories registered",factories.length>0);
   
   
  }
View Full Code Here


    }
  }

  public void testConstructor() {
   
    new FactoryRegistry();
  }
View Full Code Here

    new FactoryRegistry();
  }
 
  public void testSimpleConstructorHasNoFactories() {
   
    FactoryRegistry reg=new FactoryRegistry();
    ImageFactory[] factories=reg.getFactories();
   
    assertEquals(0,factories.length);
   
  }
View Full Code Here

   
  }
 
  public void testNullImageFileNameThrowsError() throws IOException {
   
    FactoryRegistry reg=new FactoryRegistry();
    try {
    reg.getImage(null);
    fail("Expected illegal argument exception");
   
    } catch(IllegalArgumentException e) {
      ; // ok
    }
View Full Code Here

   
  }
 
  public void testNullRutimeFileNameThrowsError() throws IOException {
   
    FactoryRegistry reg=new FactoryRegistry();
    try {
    reg.getJavaRuntime(null);
    fail("Expected illegal argument exception");
   
    } catch(IllegalArgumentException e) {
      ; // ok
    }
View Full Code Here

    }
   
  }
  public void testNoSuffixImageFileNameReturnsNull() throws IOException {
   
    FactoryRegistry reg=new FactoryRegistry();
    File f=new File("testfile");
   
    Image result=reg.getImage(f);
    assertNull(result);
   
  }
View Full Code Here

    assertNull(result);
   
  }
public void testNoSuffixRuntimeFileNameReturnsNull() throws IOException {
   
    FactoryRegistry reg=new FactoryRegistry();
    File f=new File("testfile");
   
    JavaRuntime result=reg.getJavaRuntime(f);
    assertNull(result);
   
  }
View Full Code Here

    assertNull(result);
   
  }
  public void testDotSuffixFileNameReturnsNull() throws IOException {
   
    FactoryRegistry reg=new FactoryRegistry();
    File f=new File("testfile.");
   
    Image result=reg.getImage(f);
    assertNull(result);
   
  }
View Full Code Here

    assertNull(result);
   
  }
  public void testSimpleNoSuffixes() throws IOException {
   
    FactoryRegistry reg=new FactoryRegistry();
    reg.addFactory(new MockFactory(null));
   
    File f=new File("testfile.suffix");
   
    Image result=reg.getImage(f);
    assertNull(result);
   
  }
View Full Code Here

    assertNull(result);
   
  }
  public void testSimpleSuffixMatch() throws IOException {
   
    FactoryRegistry reg=new FactoryRegistry();
    String[] suffixes=new String[]{"suffix"};
   
    reg.addFactory(new MockFactory(suffixes));
   
    File f=new File("testfile.suffix");
   
    Image result=reg.getImage(f);
    assertNotNull(result);
   
  }
View Full Code Here

TOP

Related Classes of javax.tools.diagnostics.FactoryRegistry

Copyright © 2018 www.massapicom. 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.