1 39 40 package com.sun.japex; 41 42 import java.io.*; 43 import java.util.ArrayList ; 44 import java.util.Properties ; 45 import javax.xml.bind.*; 46 47 public class ConfigFileLoader { 48 49 TestSuite _testSuite; 50 51 public ConfigFileLoader(String fileName) throws ConfigFileException { 52 try { 53 JAXBContext ctx = JAXBContext.newInstance("com.sun.japex.testsuite"); 54 Unmarshaller u = ctx.createUnmarshaller(); 55 56 com.sun.japex.testsuite.TestSuite testsuite = 58 (com.sun.japex.testsuite.TestSuite) u.unmarshal( 59 new BufferedInputStream(new FileInputStream(fileName))); 60 61 _testSuite = new TestSuite(testsuite); 63 } 64 catch (Exception e) { 65 throw new RuntimeException (e); 66 } 67 } 68 69 public TestSuite getTestSuite() { 70 return _testSuite; 71 } 72 73 } 74 | Popular Tags |