Squash branch commits

This commit is contained in:
crschnick
2024-02-13 12:10:20 +00:00
parent ce45ff9ec6
commit 7c7fa28190
317 changed files with 6133 additions and 7951 deletions

View File

@@ -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);
}
}

View File

@@ -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;
}
}

View 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();
}
}