Code example for File

Methods: existsmkdir

0
	} 
 
	@Test(dependsOnMethods = "importExampleData") 
	public void exportArchive() throws Exception 
	{ 
		File tmpDir = new File(System.getProperty("java.io.tmpdir") + File.separator + "dbexport_" + System.nanoTime());
		tmpDir.mkdir();
		if (!tmpDir.exists()) throw new Exception("Could not create tmp folder: " + tmpDir.getAbsolutePath());
		List<Class<? extends Entity>> specialCases = new ArrayList<Class<? extends Entity>>();
		specialCases.add(org.molgenis.auth.MolgenisGroup.class); 
		specialCases.add(org.molgenis.auth.MolgenisPermission.class); 
		specialCases.add(org.molgenis.auth.MolgenisRoleGroupLink.class); 
		specialCases.add(org.molgenis.auth.MolgenisUser.class); 
		specialCases.add(org.molgenis.core.MolgenisEntity.class); 
		CsvEntityExporter entityExporter = new CsvEntityExporter();
		entityExporter.exportSpecial(tmpDir, db, specialCases, true);
		archive = TarGz.tarDir(tmpDir);
		Assert.assertTrue(archive.exists());
	} 
 
	@Test(dependsOnMethods = "exportArchive") 
	public void softResetDb() throws Exception