use of com.palantir.conjure.java.lib.Bytes in project conjure-java by palantir.
the class WireFormatTests method testAliasTypesEqualWhenInnerTypeEqual.
@Test
public void testAliasTypesEqualWhenInnerTypeEqual() throws Exception {
assertThat(StringAliasExample.of("a")).isEqualTo(StringAliasExample.of("a"));
assertThat(IntegerAliasExample.of(103)).isEqualTo(IntegerAliasExample.of(103));
assertThat(DoubleAliasExample.of(10.3)).isEqualTo(DoubleAliasExample.of(10.3));
Bytes bytes = Bytes.from(new byte[] { 0, 1, 2 });
assertThat(BinaryAliasExample.of(bytes)).isEqualTo(BinaryAliasExample.of(bytes));
}
use of com.palantir.conjure.java.lib.Bytes in project conjure-java by palantir.
the class WireFormatTests method testAliasTypesHashCodeEqualWhenInnerTypeEqual.
@Test
public void testAliasTypesHashCodeEqualWhenInnerTypeEqual() throws Exception {
assertThat(StringAliasExample.of("a").hashCode()).isEqualTo(StringAliasExample.of("a").hashCode());
assertThat(IntegerAliasExample.of(103).hashCode()).isEqualTo(IntegerAliasExample.of(103).hashCode());
assertThat(DoubleAliasExample.of(10.3).hashCode()).isEqualTo(DoubleAliasExample.of(10.3).hashCode());
Bytes bytes = Bytes.from(new byte[] { 0, 1, 2 });
assertThat(BinaryAliasExample.of(bytes).hashCode()).isEqualTo(BinaryAliasExample.of(bytes).hashCode());
}