Package org.apache.bsf.utils

Examples of org.apache.bsf.utils.TestScriptEngineFactory


            mgr.registerEngineExtension(null, null);
            fail("Expected NullPointerException");
        } catch (NullPointerException e) {
        }
        try {
            mgr.registerEngineExtension(null, new TestScriptEngineFactory());
            fail("Expected NullPointerException");
        } catch (NullPointerException e) {
        }
        try {
            mgr.registerEngineExtension("", null);
            fail("Expected NullPointerException");
        } catch (NullPointerException e) {
        }
        assertNull(mgr.getEngineByExtension("")); // not yet defined
        // Empty extensions are allowed
        mgr.registerEngineExtension("", new TestScriptEngineFactory());
        assertNotNull(mgr.getEngineByExtension("")); //now defined
        assertNull(mgr.getEngineByExtension("junit2")); // not yet defined
        mgr.registerEngineExtension("junit2", new TestScriptEngineFactory());
        assertNotNull(mgr.getEngineByExtension("junit2")); //now defined
    }
View Full Code Here


            mgr.registerEngineName(null, null);
            fail("Expected NullPointerException");
        } catch (NullPointerException e) {
        }
        try {
            mgr.registerEngineName(null, new TestScriptEngineFactory());
            fail("Expected NullPointerException");
        } catch (NullPointerException e) {
        }
        try {
            mgr.registerEngineName("", null);
            fail("Expected NullPointerException");
        } catch (NullPointerException e) {
        }
        assertNull(mgr.getEngineByName("")); // not yet defined
        // Empty extensions are allowed
        mgr.registerEngineName("", new TestScriptEngineFactory());
        assertNotNull(mgr.getEngineByName("")); //now defined
        assertNull(mgr.getEngineByName("junit2")); // not yet defined
        mgr.registerEngineName("junit2", new TestScriptEngineFactory());
        assertNotNull(mgr.getEngineByName("junit2")); //now defined
    }
View Full Code Here

            mgr.registerEngineMimeType(null, null);
            fail("Expected NullPointerException");
        } catch (NullPointerException e) {
        }
        try {
            mgr.registerEngineMimeType(null, new TestScriptEngineFactory());
            fail("Expected NullPointerException");
        } catch (NullPointerException e) {
        }
        try {
            mgr.registerEngineMimeType("", null);
            fail("Expected NullPointerException");
        } catch (NullPointerException e) {
        }
        assertNull(mgr.getEngineByMimeType("")); // not yet defined
        // Empty extensions are allowed
        mgr.registerEngineMimeType("", new TestScriptEngineFactory());
        assertNotNull(mgr.getEngineByMimeType("")); //now defined
        assertNull(mgr.getEngineByMimeType("junit2")); // not yet defined
        mgr.registerEngineMimeType("junit2", new TestScriptEngineFactory());
        assertNotNull(mgr.getEngineByMimeType("junit2")); //now defined
    }
View Full Code Here

            mgr.registerEngineExtension(null, null);
            fail("Expected NullPointerException");
        } catch (NullPointerException e) {
        }
        try {
            mgr.registerEngineExtension(null, new TestScriptEngineFactory());
            fail("Expected NullPointerException");
        } catch (NullPointerException e) {
        }
        try {
            mgr.registerEngineExtension("", null);
            fail("Expected NullPointerException");
        } catch (NullPointerException e) {
        }
        assertNull(mgr.getEngineByExtension("")); // not yet defined
        // Empty extensions are allowed
        mgr.registerEngineExtension("", new TestScriptEngineFactory());
        assertNotNull(mgr.getEngineByExtension("")); //now defined
        assertNull(mgr.getEngineByExtension("junit2")); // not yet defined
        mgr.registerEngineExtension("junit2", new TestScriptEngineFactory());
        assertNotNull(mgr.getEngineByExtension("junit2")); //now defined
  }
View Full Code Here

            mgr.registerEngineName(null, null);
            fail("Expected NullPointerException");
        } catch (NullPointerException e) {
        }
        try {
            mgr.registerEngineName(null, new TestScriptEngineFactory());
            fail("Expected NullPointerException");
        } catch (NullPointerException e) {
        }
        try {
            mgr.registerEngineName("", null);
            fail("Expected NullPointerException");
        } catch (NullPointerException e) {
        }
        assertNull(mgr.getEngineByName("")); // not yet defined
        // Empty extensions are allowed
        mgr.registerEngineName("", new TestScriptEngineFactory());
        assertNotNull(mgr.getEngineByName("")); //now defined
        assertNull(mgr.getEngineByName("junit2")); // not yet defined
        mgr.registerEngineName("junit2", new TestScriptEngineFactory());
        assertNotNull(mgr.getEngineByName("junit2")); //now defined
  }
View Full Code Here

            mgr.registerEngineMimeType(null, null);
            fail("Expected NullPointerException");
        } catch (NullPointerException e) {
        }
        try {
            mgr.registerEngineMimeType(null, new TestScriptEngineFactory());
            fail("Expected NullPointerException");
        } catch (NullPointerException e) {
        }
        try {
            mgr.registerEngineMimeType("", null);
            fail("Expected NullPointerException");
        } catch (NullPointerException e) {
        }
        assertNull(mgr.getEngineByMimeType("")); // not yet defined
        // Empty extensions are allowed
        mgr.registerEngineMimeType("", new TestScriptEngineFactory());
        assertNotNull(mgr.getEngineByMimeType("")); //now defined
        assertNull(mgr.getEngineByMimeType("junit2")); // not yet defined
        mgr.registerEngineMimeType("junit2", new TestScriptEngineFactory());
        assertNotNull(mgr.getEngineByMimeType("junit2")); //now defined
  }
View Full Code Here

TOP

Related Classes of org.apache.bsf.utils.TestScriptEngineFactory

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.