use of org.apache.flink.graph.drivers.transform.GraphKeyTypeTransform.StringValueToLongValueWithProperHashCode in project flink by apache.
the class GraphKeyTypeTransformTest method testFromStringValue.
// StringValue
@Test
public void testFromStringValue() throws Exception {
TranslateFunction<StringValue, LongValueWithProperHashCode> translator = new StringValueToLongValueWithProperHashCode();
Assert.assertEquals(new LongValueWithProperHashCode(0L), translator.translate(new StringValue("0"), longValueWithProperHashCode));
Assert.assertEquals(new LongValueWithProperHashCode(Long.MIN_VALUE), translator.translate(new StringValue("-9223372036854775808"), longValueWithProperHashCode));
Assert.assertEquals(new LongValueWithProperHashCode(Long.MAX_VALUE), translator.translate(new StringValue("9223372036854775807"), longValueWithProperHashCode));
}
Aggregations