use of com.google.protobuf.StringValue in project core-java by SpineEventEngine.
the class CommandsShould method extract_message_from_command.
@Test
public void extract_message_from_command() {
final StringValue message = Wrapper.forString("extract_message_from_command");
final Command command = requestFactory.createCommand(message);
assertEquals(message, Commands.getMessage(command));
}
use of com.google.protobuf.StringValue in project core-java by SpineEventEngine.
the class IdentifiersShould method unpack_passed_Any.
@Test
public void unpack_passed_Any() {
final StringValue id = newUuidValue();
assertEquals(id.getValue(), Identifiers.idToString(AnyPacker.pack(id)));
}
use of com.google.protobuf.StringValue in project core-java by SpineEventEngine.
the class IdentifiersShould method convert_to_string_message_id_with_message_field.
@Test
public void convert_to_string_message_id_with_message_field() {
final StringValue value = forString(TEST_ID);
final NestedMessageId idToConvert = NestedMessageId.newBuilder().setId(value).build();
final String result = idToString(idToConvert);
assertEquals(TEST_ID, result);
}
use of com.google.protobuf.StringValue in project core-java by SpineEventEngine.
the class CommandAttributeShould method set_and_get_message_attribute.
@Test
public void set_and_get_message_attribute() {
final CommandAttribute<StringValue> attr = new CommandAttribute<StringValue>("str-val") {
};
final StringValue value = Wrapper.forString(getClass().getName());
assertSetGet(attr, value);
}
use of com.google.protobuf.StringValue in project core-java by SpineEventEngine.
the class EventsShould method get_producer_from_event_context.
@Test
public void get_producer_from_event_context() {
final StringValue msg = unpack(context.getProducerId());
final String id = getProducer(context);
assertEquals(msg.getValue(), id);
}
Aggregations