1 19 20 package org.netbeans.modules.j2ee.ejbjarproject.test; 21 22 import org.netbeans.junit.NbTestCase; 23 import org.openide.filesystems.Repository; 24 25 30 public class TestBase extends NbTestCase { 31 32 private static final Repository REPOSITORY; 33 34 static { 35 TestUtil.setLookup(new Object [0]); 37 38 REPOSITORY = new RepositoryImpl(); 39 setLookup(new Object [0]); 40 } 41 42 public static void setLookup(Object [] instances) { 43 Object [] newInstances = new Object [instances.length + 1]; 44 System.arraycopy(instances, 0, newInstances, 0, instances.length); 45 newInstances[newInstances.length - 1] = REPOSITORY; 46 47 TestUtil.setLookup(newInstances); 48 } 49 50 public TestBase(String name) { 51 super(name); 52 } 53 } 54 | Popular Tags |