use of io.spine.type.TypeUrl in project core-java by SpineEventEngine.
the class StandShould method checkHasExactlyOne.
private static void checkHasExactlyOne(Set<TypeUrl> availableTypes, Descriptors.Descriptor expectedType) {
assertEquals(1, availableTypes.size());
final TypeUrl actualTypeUrl = availableTypes.iterator().next();
final TypeUrl expectedTypeUrl = TypeUrl.from(expectedType);
assertEquals("Type was registered incorrectly", expectedTypeUrl, actualTypeUrl);
}
use of io.spine.type.TypeUrl in project core-java by SpineEventEngine.
the class QueriesShould method return_proper_type_for_known_target.
@Test
public void return_proper_type_for_known_target() {
final Target target = Targets.allOf(TestEntity.class);
final Query query = Query.newBuilder().setTarget(target).build();
final TypeUrl type = Queries.typeOf(query);
assertNotNull(type);
assertEquals(TARGET_ENTITY_TYPE_URL, type.toString());
}
Aggregations