use of com.google.protobuf.StringValue in project core-java by SpineEventEngine.
the class EventFactory method toEventContext.
private static EventContext toEventContext(IntegrationEventContext value) {
final StringValue producerId = Wrapper.forString(value.getBoundedContextName());
final Timestamp timestamp = value.getTimestamp();
final Any producerAny = pack(producerId);
return EventContext.newBuilder().setTimestamp(timestamp).setProducerId(producerAny).build();
}
use of com.google.protobuf.StringValue in project core-java by SpineEventEngine.
the class ValidateShould method check_if_message_is_in_default.
@Test(expected = IllegalStateException.class)
public void check_if_message_is_in_default() {
final StringValue nonDefault = newUuidValue();
checkDefault(nonDefault);
}
use of com.google.protobuf.StringValue in project core-java by SpineEventEngine.
the class ValidateShould method return_non_default_value_on_check.
@Test
public void return_non_default_value_on_check() {
final StringValue nonDefault = newUuidValue();
assertEquals(nonDefault, checkNotDefault(nonDefault));
assertEquals(nonDefault, checkNotDefault(nonDefault, "with error message"));
}
use of com.google.protobuf.StringValue in project core-java by SpineEventEngine.
the class JsonShould method print_to_json.
@Test
public void print_to_json() {
final StringValue value = Wrapper.forString("print_to_json");
assertFalse(toJson(value).isEmpty());
}
use of com.google.protobuf.StringValue in project core-java by SpineEventEngine.
the class AnyPackerShould method have_unpacking_func.
@Test
public void have_unpacking_func() {
final StringValue value = newUuidValue();
assertEquals(value, AnyPacker.unpackFunc().apply(Any.pack(value)));
}
Aggregations