use of edu.cmu.tetrad.util.TetradSerializableUtils in project tetrad by cmu-phil.
the class TestSerialization method testLoadabilility.
/**
* Tests to make sure sessions saved out using any version for which
* archived serialized class examplars can be loaded using the model
* version.
*/
@Test
public void testLoadabilility() {
String serializableScope = "target/classes/edu/cmu";
String currentDirectory = "build/tetrad/serializable/model";
String archiveDirectory = "archives";
TetradSerializableUtils utils = new TetradSerializableUtils(serializableScope, currentDirectory, archiveDirectory);
try {
utils.checkNestingOfFields();
utils.serializeCurrentDirectory();
utils.deserializeCurrentDirectory();
utils.deserializeArchivedVersions();
} catch (RuntimeException e) {
System.out.println();
e.printStackTrace();
fail("TestSerialization.testLoadability() failed! Please fix " + "errors.");
}
}
use of edu.cmu.tetrad.util.TetradSerializableUtils in project tetrad by cmu-phil.
the class TestSerialization method doArchive.
public void doArchive() {
String serializableScope = "build/tetrad/classes/edu/cmu";
String currentDirectory = "build/tetrad/serializable/model";
String archiveDirectory = "archives";
TetradSerializableUtils utils = new TetradSerializableUtils(serializableScope, currentDirectory, archiveDirectory);
utils.checkNestingOfFields();
utils.serializeCurrentDirectory();
utils.deserializeCurrentDirectory();
utils.deserializeArchivedVersions();
utils.archiveCurrentDirectory();
}
use of edu.cmu.tetrad.util.TetradSerializableUtils in project tetrad by cmu-phil.
the class TestSerialization method testLoadabilility.
/**
* Tests to make sure sessions saved out using any version for which
* archived serialized class examplars can be loaded using the model
* version.
*/
// @Test
public void testLoadabilility() {
String serializableScope = "target/classes/edu/cmu";
String currentDirectory = "build/tetrad/serializable/model";
String archiveDirectory = "archives";
TetradSerializableUtils utils = new TetradSerializableUtils(serializableScope, currentDirectory, archiveDirectory);
try {
utils.checkNestingOfFields();
utils.serializeCurrentDirectory();
utils.deserializeCurrentDirectory();
utils.deserializeArchivedVersions();
} catch (RuntimeException e) {
System.out.println();
e.printStackTrace();
fail("TestSerialization.testLoadability() failed! Please fix " + "errors.");
}
}
use of edu.cmu.tetrad.util.TetradSerializableUtils in project tetrad by cmu-phil.
the class TestSerialization method doArchive.
public void doArchive() {
String serializableScope = "build/tetrad/classes/edu/cmu";
String currentDirectory = "build/tetrad/serializable/model";
String archiveDirectory = "archives";
TetradSerializableUtils utils = new TetradSerializableUtils(serializableScope, currentDirectory, archiveDirectory);
utils.checkNestingOfFields();
utils.serializeCurrentDirectory();
utils.deserializeCurrentDirectory();
utils.deserializeArchivedVersions();
utils.archiveCurrentDirectory();
}
Aggregations