1 package be
.nikiroo
.fanfix
.test
;
4 import java
.io
.FileOutputStream
;
5 import java
.io
.IOException
;
6 import java
.util
.Properties
;
8 import be
.nikiroo
.fanfix
.Instance
;
9 import be
.nikiroo
.fanfix
.bundles
.ConfigBundle
;
10 import be
.nikiroo
.utils
.IOUtils
;
11 import be
.nikiroo
.utils
.resources
.Bundles
;
12 import be
.nikiroo
.utils
.test
.TestLauncher
;
19 public class Test
extends TestLauncher
{
20 public Test(String
[] args
) {
21 super("Fanfix", args
);
22 Instance
.setTraceHandler(null);
23 addSeries(new BasicSupportTest(args
));
24 addSeries(new LibraryTest(args
));
28 * Main entry point of the program.
31 * the arguments passed to the {@link TestLauncher}s.
34 static public void main(String
[] args
) throws IOException
{
35 File tmpConfig
= File
.createTempFile("fanfix-config_", ".test");
36 File tmpCache
= File
.createTempFile("fanfix-cache_", ".test");
42 FileOutputStream out
= new FileOutputStream(new File(tmpConfig
,
43 "config.properties"));
44 Properties props
= new Properties();
45 props
.setProperty("CACHE_DIR", tmpCache
.getAbsolutePath());
46 props
.store(out
, null);
49 ConfigBundle config
= new ConfigBundle();
50 Bundles
.setDirectory(tmpConfig
.getAbsolutePath());
51 config
.updateFile(tmpConfig
.getPath());
53 System
.setProperty("CONFIG_DIR", tmpConfig
.getAbsolutePath());
55 int result
= new Test(args
).launch();
57 IOUtils
.deltree(tmpConfig
);
58 IOUtils
.deltree(tmpCache
);