Initial commit

This commit is contained in:
Christopher Schnick
2021-12-01 19:17:54 +01:00
commit 63cdfb40c5
92 changed files with 3882 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
package io.xpipe.api.test;
import io.xpipe.api.DataTable;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
@ExtendWith({XPipeConfig.class})
public class DataTableTest {
@Test
public void testGet() {
var table = DataTable.get("new folder:username");
var r = table.read(2);
var a = 0;
}
}

View File

@@ -0,0 +1,28 @@
package io.xpipe.api.test;
import io.xpipe.beacon.XPipeDaemon;
import org.junit.jupiter.api.extension.BeforeAllCallback;
import org.junit.jupiter.api.extension.ExtensionContext;
import static org.junit.jupiter.api.extension.ExtensionContext.Namespace.GLOBAL;
public class XPipeConfig implements BeforeAllCallback, ExtensionContext.Store.CloseableResource {
private static boolean started = false;
@Override
public void beforeAll(ExtensionContext context) throws Exception {
if (!started) {
started = true;
// Your "before all tests" startup logic goes here
// The following line registers a callback hook when the root test context is shut down
context.getRoot().getStore(GLOBAL).put("any unique name", this);
XPipeDaemon.startDaemon();
}
}
@Override
public void close() {
// Your "after all tests" logic goes here
}
}

View File

@@ -0,0 +1,8 @@
module io.xpipe.api.test {
exports io.xpipe.api.test;
requires io.xpipe.api;
requires io.xpipe.beacon;
requires io.xpipe.app;
requires org.junit.jupiter.api;
}