Search in sources :

Example 1 with AJSCPropertyService

use of com.att.ajsc.filemonitor.AJSCPropertyService in project AJSC by att.

the class AJSCPropertyServiceTest method setUp.

@SuppressWarnings("unchecked")
@Before
public void setUp() {
    super.setUp();
    temp = new File(System.getProperty("AJSC_CONF_HOME") + File.separator + "etc" + File.separator + "appprops" + File.separator + "temp.properties");
    File n = new File(Paths.get("").toAbsolutePath().toString() + File.separator + "src" + File.separator + "test" + File.separator + "resources" + File.separator + "appprops");
    PrintWriter p;
    try {
        p = new PrintWriter(temp);
        p.println("sfm0=/opt/app/node");
        p.close();
    } catch (FileNotFoundException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
    APService = new AJSCPropertyService();
    AJSCPropertiesMap map = new AJSCPropertiesMap();
    APService.setFilePropertiesMap(map);
    try {
        APService.init();
    } catch (Exception e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
}
Also used : AJSCPropertyService(com.att.ajsc.filemonitor.AJSCPropertyService) FileNotFoundException(java.io.FileNotFoundException) File(java.io.File) AJSCPropertiesMap(com.att.ajsc.filemonitor.AJSCPropertiesMap) FileNotFoundException(java.io.FileNotFoundException) PrintWriter(java.io.PrintWriter) Before(org.junit.Before)

Aggregations

AJSCPropertiesMap (com.att.ajsc.filemonitor.AJSCPropertiesMap)1 AJSCPropertyService (com.att.ajsc.filemonitor.AJSCPropertyService)1 File (java.io.File)1 FileNotFoundException (java.io.FileNotFoundException)1 PrintWriter (java.io.PrintWriter)1 Before (org.junit.Before)1