1 package org.objectweb.celtix.systest.securebasic; 2 3 import java.util.HashMap ; 4 import java.util.Map ; 5 6 import org.objectweb.celtix.systest.common.ClientServerSetupBase; 7 import org.objectweb.celtix.systest.common.ClientServerTestBase; 8 9 public class SecureBasicUtils extends ClientServerTestBase { 10 11 private static final String BACK_TO_SRC_DIR = 12 "../../../../../../../src/test/java/org/objectweb/celtix/systest/securebasic/"; 13 14 public static boolean startServer(String configFileLocation, 15 String beanId, 16 String securityConfigurer, 17 ClientServerSetupBase cssb, 18 Class clazz) { 19 20 Map <String , String > props = new HashMap <String , String >(); 21 22 if (configFileLocation != null) { 23 props.put("celtix.config.file", configFileLocation); 24 } 25 if (securityConfigurer != null) { 26 props.put(beanId, securityConfigurer); 27 } 28 assertTrue("server did not launch correctly", cssb.launchServer(clazz, props, null)); 29 return true; 30 } 31 32 protected static String getTestDir(Object obj) { 33 return obj.getClass().getResource(".").getPath() + BACK_TO_SRC_DIR; 34 } 35 36 37 38 } 39 | Popular Tags |