1 package org.openecomp.appc.client.lcm.impl.business;
4 import org.junit.Assert;
5 import org.junit.Ignore;
7 import org.openecomp.appc.client.lcm.api.ApplicationContext;
8 import org.openecomp.appc.client.lcm.api.LifeCycleManagerStateful;
9 import org.openecomp.appc.client.lcm.exceptions.AppcClientException;
10 import org.openecomp.appc.client.lcm.impl.business.LCMRequestProcessor;
12 import java.io.FileInputStream;
13 import java.io.FileNotFoundException;
14 import java.io.IOException;
15 import java.io.InputStream;
16 import java.util.Properties;
18 public class TestAppcLifeCycleManagerServiceFactoryImpl {
20 AppcLifeCycleManagerServiceFactoryImpl appcLifeCycleManagerServiceFactory=new AppcLifeCycleManagerServiceFactoryImpl();
23 public void testCreateLifeCycleManagerStateful() throws AppcClientException{
24 LifeCycleManagerStateful lifeCycleManagerStateful;
25 ApplicationContext applicationContext=new ApplicationContext();
26 applicationContext.setApplicationID("AppID");
27 applicationContext.setMechID("mechId");
28 String folder="src/test/resources/data";
29 Properties properties =getProperties(folder);
30 lifeCycleManagerStateful=appcLifeCycleManagerServiceFactory.createLifeCycleManagerStateful(applicationContext,properties);
32 Assert.assertNotNull(lifeCycleManagerStateful);
36 public static Properties getProperties(String folder) {
37 Properties prop = new Properties();
39 InputStream conf = null;
41 conf = new FileInputStream(folder + "client-simulator.properties");
42 } catch (FileNotFoundException e) {
48 } catch (IOException e) {
53 prop.load(Thread.currentThread().getContextClassLoader().getResourceAsStream("client-simulator.properties"));
54 } catch (Exception e) {
55 throw new RuntimeException("### ERROR ### - Could not load properties to test");