mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-04-26 01:17:52 -04:00
Squash branch commits
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
package io.xpipe.api.test;
|
||||
|
||||
import io.xpipe.api.DataTableAccumulator;
|
||||
import io.xpipe.core.data.node.TupleNode;
|
||||
import io.xpipe.core.data.node.ValueNode;
|
||||
import io.xpipe.core.data.type.TupleType;
|
||||
import io.xpipe.core.data.type.ValueType;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class DataTableAccumulatorTest extends ApiTest {
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
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();
|
||||
acc.add(val);
|
||||
var table = acc.finish(":test");
|
||||
|
||||
// Assertions.assertEquals(table.getInfo().getDataType(), TupleType.tableType(List.of("col1", "col2")));
|
||||
// Assertions.assertEquals(table.getInfo().getRowCountIfPresent(), OptionalInt.empty());
|
||||
// var read = table.read(1).at(0);
|
||||
// Assertions.assertEquals(val, read);
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
package io.xpipe.api.test;
|
||||
|
||||
import io.xpipe.api.DataSource;
|
||||
import io.xpipe.core.store.DataStoreId;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class DataTableTest extends ApiTest {
|
||||
|
||||
@BeforeAll
|
||||
public static void setupStorage() throws Exception {
|
||||
DataSource.create(
|
||||
DataStoreId.fromString(":usernames"), "csv", DataTableTest.class.getResource("username.csv"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGet() {
|
||||
var table = DataSource.getById(":usernames").asTable();
|
||||
var r = table.read(2);
|
||||
var a = 0;
|
||||
}
|
||||
}
|
||||
14
api/src/test/java/io/xpipe/api/test/StartupTest.java
Normal file
14
api/src/test/java/io/xpipe/api/test/StartupTest.java
Normal file
@@ -0,0 +1,14 @@
|
||||
package io.xpipe.api.test;
|
||||
|
||||
import io.xpipe.beacon.BeaconDaemonController;
|
||||
import io.xpipe.core.util.XPipeDaemonMode;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class StartupTest {
|
||||
|
||||
@Test
|
||||
public void test( ) throws Exception {
|
||||
BeaconDaemonController.start(XPipeDaemonMode.TRAY);
|
||||
BeaconDaemonController.stop();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user