use of org.apache.rya.export.api.metadata.MergeParentMetadata in project incubator-rya by apache.
the class ParentMetadataRepositoryAdapterTest method deserializeTest.
@Test
public void deserializeTest() {
final DBObject dbo = BasicDBObjectBuilder.start().add(RYANAME_KEY, TEST_INSTANCE).add(TIMESTAMP_KEY, TEST_TIMESTAMP).add(FILTER_TIMESTAMP_KEY, TEST_FILTER_TIMESTAMP).add(PARENT_TIME_OFFSET_KEY, TEST_TIME_OFFSET).get();
final MergeParentMetadata expected = new MergeParentMetadata.Builder().setRyaInstanceName(TEST_INSTANCE).setTimestamp(TEST_TIMESTAMP).setFilterTimestmap(TEST_FILTER_TIMESTAMP).setParentTimeOffset(TEST_TIME_OFFSET).build();
final MergeParentMetadata actual = adapter.deserialize(dbo);
assertEquals(expected, actual);
}
use of org.apache.rya.export.api.metadata.MergeParentMetadata in project incubator-rya by apache.
the class ParentMetadataRepositoryAdapterTest method serializeTest.
@Test
public void serializeTest() {
final MergeParentMetadata merge = new MergeParentMetadata.Builder().setRyaInstanceName(TEST_INSTANCE).setTimestamp(TEST_TIMESTAMP).setFilterTimestmap(TEST_FILTER_TIMESTAMP).setParentTimeOffset(TEST_TIME_OFFSET).build();
final DBObject expected = BasicDBObjectBuilder.start().add(RYANAME_KEY, TEST_INSTANCE).add(TIMESTAMP_KEY, TEST_TIMESTAMP).add(FILTER_TIMESTAMP_KEY, TEST_FILTER_TIMESTAMP).add(PARENT_TIME_OFFSET_KEY, TEST_TIME_OFFSET).get();
final DBObject actual = adapter.serialize(merge);
assertEquals(expected, actual);
}
Aggregations