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
{
21 * Create the Fanfix {@link TestLauncher}.
24 * the arguments to configure the number of columns and the ok/ko
27 public Test(String
[] args
) {
28 super("Fanfix", args
);
29 Instance
.setTraceHandler(null);
30 addSeries(new BasicSupportTest(args
));
31 addSeries(new LibraryTest(args
));
32 addSeries(new ConversionTest(args
));
36 * Main entry point of the program.
39 * the arguments passed to the {@link TestLauncher}s.
41 * in case of I/O error
43 static public void main(String
[] args
) throws IOException
{
44 File tmpConfig
= File
.createTempFile("fanfix-config_", ".test");
45 File tmpCache
= File
.createTempFile("fanfix-cache_", ".test");
51 FileOutputStream out
= null;
53 out
= new FileOutputStream(new File(tmpConfig
, "config.properties"));
54 Properties props
= new Properties();
55 props
.setProperty("CACHE_DIR", tmpCache
.getAbsolutePath());
56 props
.store(out
, null);
63 ConfigBundle config
= new ConfigBundle();
64 Bundles
.setDirectory(tmpConfig
.getAbsolutePath());
65 config
.updateFile(tmpConfig
.getPath());
67 System
.setProperty("CONFIG_DIR", tmpConfig
.getAbsolutePath());
69 int result
= new Test(args
).launch();
71 IOUtils
.deltree(tmpConfig
);
72 IOUtils
.deltree(tmpCache
);