use of io.spine.client.QueryParameter in project core-java by SpineEventEngine.
the class QueryParameterShould method support_toString.
@Test
public void support_toString() {
final String name = "myColumn";
final int value = 42;
final QueryParameter param = eq(name, value);
final String stringRepr = param.toString();
assertThat(stringRepr, containsString(name));
assertThat(stringRepr, containsString(valueOf(value)));
}
use of io.spine.client.QueryParameter in project core-java by SpineEventEngine.
the class QueryParameterShould method support_equality.
@Test
public void support_equality() {
final String param1 = "param1";
final String param2 = "param2";
final String foobar = "foobar";
final String baz = "baz";
final StringValue foobarValue = StringValue.newBuilder().setValue(foobar).build();
final QueryParameter parameter1 = eq(param1, foobar);
final QueryParameter parameter2 = eq(param1, foobarValue);
final QueryParameter parameter3 = eq(param1, baz);
final QueryParameter parameter4 = eq(param2, foobar);
new EqualsTester().addEqualityGroup(parameter1, parameter2).addEqualityGroup(parameter3).addEqualityGroup(parameter4).testEquals();
}
Aggregations