public abstract class CoserTestAbstract extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static CoserBusinessConfig |
config |
protected static CoserApplicationContext |
serviceContext |
protected static File |
testDirectory |
| Constructor and Description |
|---|
CoserTestAbstract() |
| Modifier and Type | Method and Description |
|---|---|
static void |
cleanDirectory() |
protected void |
copyDirectoryContent(String path,
File target) |
protected Project |
createTestProject(ProjectService projectService,
boolean controlValidated)
Create an initialized project with csv file in test resources.
|
protected File |
getFile(File root,
String... paths)
Util method used to build path for test.
|
static void |
initConfig() |
void |
initProjectDatabase()
Recopie la base pour chaque test pour a avoir une vrai isolation
au niveau des tests.
|
protected Project |
openTestProject(ProjectService projectService,
String projectName)
Ouvre un projet present dans le repertoire de test (copié depuis
les resources ou créé durant les tests).
|
static void |
setUpClassLoader() |
protected static CoserBusinessConfig config
protected static CoserApplicationContext serviceContext
protected static File testDirectory
public static void setUpClassLoader()
public static void initConfig()
throws IOException
IOExceptionpublic static void cleanDirectory()
throws IOException
IOExceptionpublic void initProjectDatabase()
throws IOException
IOExceptionprotected Project createTestProject(ProjectService projectService, boolean controlValidated) throws CoserBusinessException
projectService - project servicecontrolValidated - if true mark loaded control as validatedCoserBusinessExceptionprotected Project openTestProject(ProjectService projectService, String projectName) throws CoserBusinessException
projectService - project serviceprojectName - project nameCoserBusinessExceptionprotected File getFile(File root, String... paths)
root - root dirpaths - path sub componentprotected void copyDirectoryContent(String path, File target) throws IOException
IOExceptionCopyright © 2010–2015 Ifremer. All rights reserved.