1 package junit.tests; 2 3 6 import junit.framework.*; 7 import junit.runner.*; 8 9 public class LoadedFromJar extends Assert { 10 public void verify() { 11 verifyApplicationClassLoadedByTestLoader(); 12 } 13 private boolean isTestCaseClassLoader(ClassLoader cl) { 14 return (cl != null && cl.getClass().getName().equals(junit.runner.TestCaseClassLoader.class.getName())); 15 } 16 private void verifyApplicationClassLoadedByTestLoader() { 17 assertTrue(isTestCaseClassLoader(getClass().getClassLoader())); 18 } 19 } | Popular Tags |