Search in sources :

Example 1 with TetradSerializableUtils

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.");
    }
}
Also used : TetradSerializableUtils(edu.cmu.tetrad.util.TetradSerializableUtils) Test(org.junit.Test)

Example 2 with TetradSerializableUtils

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();
}
Also used : TetradSerializableUtils(edu.cmu.tetrad.util.TetradSerializableUtils)

Example 3 with TetradSerializableUtils

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.");
    }
}
Also used : TetradSerializableUtils(edu.cmu.tetrad.util.TetradSerializableUtils)

Example 4 with TetradSerializableUtils

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();
}
Also used : TetradSerializableUtils(edu.cmu.tetrad.util.TetradSerializableUtils)

Aggregations

TetradSerializableUtils (edu.cmu.tetrad.util.TetradSerializableUtils)4 Test (org.junit.Test)1