use of com.baidu.hugegraph.computer.core.input.loader.FileInputSplit in project hugegraph-computer by hugegraph.
the class FileInputSplitTest method testConstructor.
@Test
public void testConstructor() {
InputStruct inputStruct = Mockito.mock(InputStruct.class);
FileInputSplit split = new FileInputSplit(ElemType.VERTEX, inputStruct, "/tmp/test");
Assert.assertEquals("/tmp/test", split.path());
Assert.assertEquals(inputStruct, split.struct());
Assert.assertSame(ElemType.VERTEX, split.type());
}
use of com.baidu.hugegraph.computer.core.input.loader.FileInputSplit in project hugegraph-computer by hugegraph.
the class FileInputSplitTest method testHashCode.
@Test
public void testHashCode() {
InputStruct inputStruct = Mockito.mock(InputStruct.class);
FileInputSplit split1 = new FileInputSplit(ElemType.VERTEX, inputStruct, "/tmp/test");
FileInputSplit split2 = new FileInputSplit(ElemType.VERTEX, inputStruct, "/tmp/test");
Assert.assertEquals(split1.hashCode(), split2.hashCode());
}
use of com.baidu.hugegraph.computer.core.input.loader.FileInputSplit in project hugegraph-computer by hugegraph.
the class FileInputSplitTest method testEquals.
@Test
public void testEquals() {
InputStruct inputStruct = Mockito.mock(InputStruct.class);
FileInputSplit split1 = new FileInputSplit(ElemType.VERTEX, inputStruct, "/tmp/test");
FileInputSplit split2 = new FileInputSplit(ElemType.VERTEX, inputStruct, "/tmp/test");
Assert.assertEquals(split1, split1);
Assert.assertEquals(split1, split2);
Assert.assertNotEquals(split1, null);
Assert.assertNotEquals(split1, new Object());
Assert.assertEquals(InputSplit.END_SPLIT, InputSplit.END_SPLIT);
Assert.assertNotEquals(InputSplit.END_SPLIT, split1);
}
Aggregations