@Test
public void shouldConvertToDomainObjects() throws OperationException, UnsupportedEncodingException {
// Given
final OperationChain<Iterable<? extends DomainObject>> opChain = new OperationChain.Builder()
.first(new GetElements.Builder()
.input(new EntitySeed(SOURCE_1))
.build())
.then(new GenerateObjects.Builder<DomainObject>()
.generator(new BasicObjectGenerator())
.build())
.build();
// When
final List<DomainObject> results = Lists.newArrayList(graph.execute(opChain, getUser()));
final EntityDomainObject entityDomainObject = new EntityDomainObject(SOURCE_1, "3", null);
final EdgeDomainObject edgeDomainObject = new EdgeDomainObject(SOURCE_1, DEST_1, false, 1, 1L);
// Then
assertNotNull(results);
assertEquals(2, results.size());
assertThat(results, IsCollectionContaining.hasItems(
entityDomainObject, edgeDomainObject));
}
GeneratorsIT.java 文件源码
java
阅读 42
收藏 0
点赞 0
评论 0
项目:Gaffer
作者:
评论列表
文章目录