Search in sources :

Example 1 with ActivityLoader

use of org.activityinfo.store.mysql.metadata.ActivityLoader in project activityinfo by bedatadriven.

the class MySqlCatalogTest method testActivitySerialization.

@Test
public void testActivitySerialization() throws SQLException, IOException {
    ActivityLoader loader = new ActivityLoader(dbunit.getExecutor());
    Map<Integer, Activity> map = loader.load(Collections.singleton(1));
    Activity activity = map.get(1);
    ObjectOutputStream oos = new ObjectOutputStream(new ByteArrayOutputStream());
    oos.writeObject(activity);
}
Also used : Activity(org.activityinfo.store.mysql.metadata.Activity) ActivityLoader(org.activityinfo.store.mysql.metadata.ActivityLoader) ByteArrayOutputStream(java.io.ByteArrayOutputStream) ObjectOutputStream(java.io.ObjectOutputStream) Test(org.junit.Test)

Aggregations

ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 ObjectOutputStream (java.io.ObjectOutputStream)1 Activity (org.activityinfo.store.mysql.metadata.Activity)1 ActivityLoader (org.activityinfo.store.mysql.metadata.ActivityLoader)1 Test (org.junit.Test)1