1   package org.kit.furia;
2   
3   
4   import java.io.File;
5   import java.io.IOException;
6   
7   import org.ajmm.obsearch.index.utils.Directory;
8   import org.apache.log4j.PropertyConfigurator;
9   import org.junit.Before;
10  import org.junit.Test;
11  import org.kit.furia.fragment.FragmentBuilderClientAux;
12  import org.kit.furia.misc.FuriaProperties;
13  
14  import static org.junit.Assert.*;
15  
16  public class TestFragmentExtractor {
17  
18      @Before
19      public void setUp() throws Exception {
20      }
21      
22      @Test
23      public void testAll() throws IOException, Exception{
24          
25         /* try {
26              PropertyConfigurator.configure(FuriaProperties.getProperty("log4j.file"));
27          } catch (Exception e) {
28              System.err.print("Make sure log4j is configured properly"
29                      + e.getMessage()); 
30              e.printStackTrace();
31              assertTrue(false);
32          }
33          File input = new File(FuriaProperties.getProperty("test.db.input"), "argouml-0.17.5-4jpp.noarch.rpm.jpackage");
34          File output = new File( FuriaProperties.getProperty("test.db.output"), "fragmentExtractorTest" );
35          String[] params = new String[3];
36          params[0]= input.toString();
37          params[1] = "100";
38          params[2] = output.toString();*/
39          
40          System.setProperty("log4j.file", "furiaLog4j.config");
41          String[] params = new String[3];
42          params[0] = "/home/amuller/temp/SmallDataSetJava/JPackageClass/batik-1.6-1jpp.noarch.rpm.jpackage/";
43          params[1] = "target/test-classes/extractorTest";
44          params[2] = "asm";
45          Directory.deleteDirectory(new File(params[1]));
46          FragmentBuilderClientAux.main(params);
47      }
48  
49  }