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
.bundles
.ConfigBundle
;
9 import be
.nikiroo
.utils
.IOUtils
;
10 import be
.nikiroo
.utils
.resources
.Bundles
;
11 import be
.nikiroo
.utils
.test
.TestLauncher
;
18 public class Test
extends TestLauncher
{
19 public Test(String
[] args
) {
20 super("Fanfix", args
);
21 addSeries(new BasicSupportTest(args
));
25 * Main entry point of the program.
28 * the arguments passed to the {@link TestLauncher}s.
31 static public void main(String
[] args
) throws IOException
{
32 File tmpConfig
= File
.createTempFile("fanfix-config_", ".test");
33 File tmpCache
= File
.createTempFile("fanfix-cache_", ".test");
39 FileOutputStream out
= new FileOutputStream(new File(tmpConfig
,
40 "config.properties"));
41 Properties props
= new Properties();
42 props
.setProperty("CACHE_DIR", tmpCache
.getAbsolutePath());
43 props
.store(out
, null);
46 ConfigBundle config
= new ConfigBundle();
47 Bundles
.setDirectory(tmpConfig
.getAbsolutePath());
48 config
.updateFile(tmpConfig
.getPath());
50 System
.setProperty("CONFIG_DIR", tmpConfig
.getAbsolutePath());
52 int result
= new Test(args
).launch();
54 IOUtils
.deltree(tmpConfig
);
55 IOUtils
.deltree(tmpCache
);