1 | /** |
2 | * |
3 | */ |
4 | package de.uka.ipd.sdq.sensorframework.tests; |
5 | |
6 | import java.io.File; |
7 | import java.io.IOException; |
8 | |
9 | import de.uka.ipd.sdq.sensorframework.dao.file.FileDAOFactory; |
10 | import de.uka.ipd.sdq.sensorframework.entities.dao.IDAOFactory; |
11 | import de.uka.ipd.sdq.sensorframework.tests.util.TempDir; |
12 | |
13 | /** |
14 | * @author Steffen Becker |
15 | * |
16 | */ |
17 | public class FileSerialiserTests extends AbstractSerialiserTests { |
18 | |
19 | private File lastTempDir; |
20 | |
21 | /** |
22 | * |
23 | */ |
24 | public FileSerialiserTests() { |
25 | } |
26 | |
27 | /* (non-Javadoc) |
28 | * @see de.uka.ipd.sdq.sensorframework.tests.AbstractSerialiserTests#createCleanDAOFactory() |
29 | */ |
30 | @Override |
31 | protected IDAOFactory createCleanDAOFactory() throws IOException { |
32 | this.lastTempDir = TempDir.createGeneratedName("TempDB"); |
33 | return new FileDAOFactory(lastTempDir.getAbsolutePath()); |
34 | } |
35 | |
36 | /* (non-Javadoc) |
37 | * @see de.uka.ipd.sdq.sensorframework.tests.AbstractSerialiserTests#createDAOFactory() |
38 | */ |
39 | @Override |
40 | protected IDAOFactory createDAOFactory() { |
41 | return new FileDAOFactory(lastTempDir.getAbsolutePath()); |
42 | } |
43 | } |