mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-04-24 16:40:58 -04:00
Refactor
This commit is contained in:
@@ -15,13 +15,11 @@ public class DataTableAccumulatorTest extends ApiTest {
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
var type = TupleType.of(
|
||||
List.of("col1", "col2"),
|
||||
List.of(ValueType.of(), ValueType.of()));
|
||||
var type = TupleType.of(List.of("col1", "col2"), List.of(ValueType.of(), ValueType.of()));
|
||||
var acc = DataTableAccumulator.create(type);
|
||||
|
||||
var val = type.convert(
|
||||
TupleNode.of(List.of(ValueNode.of("val1"), ValueNode.of("val2")))).orElseThrow();
|
||||
var val = type.convert(TupleNode.of(List.of(ValueNode.of("val1"), ValueNode.of("val2"))))
|
||||
.orElseThrow();
|
||||
acc.add(val);
|
||||
var table = acc.finish(":test");
|
||||
|
||||
|
||||
@@ -9,7 +9,8 @@ public class DataTableTest extends ApiTest {
|
||||
|
||||
@BeforeAll
|
||||
public static void setupStorage() throws Exception {
|
||||
DataSource.create(DataSourceId.fromString(":usernames"), "csv", DataTableTest.class.getResource("username.csv"));
|
||||
DataSource.create(
|
||||
DataSourceId.fromString(":usernames"), "csv", DataTableTest.class.getResource("username.csv"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -6,4 +6,4 @@ module io.xpipe.api.test {
|
||||
opens io.xpipe.api.test;
|
||||
|
||||
exports io.xpipe.api.test;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user