Search in sources :

Example 1 with Base

use of io.wring.model.Base in project wring by yegor256.

the class Entrance method main.

/**
 * Main entry point.
 * @param args Arguments
 * @throws IOException If fails
 */
public static void main(final String... args) throws IOException {
    final Base base = new DyBase();
    try (final Routine routine = new Routine(base)) {
        routine.start();
        new FtCli(new TkApp(base), args).start(Exit.NEVER);
    }
}
Also used : FtCli(org.takes.http.FtCli) DyBase(io.wring.dynamo.DyBase) Routine(io.wring.agents.Routine) TkApp(io.wring.tk.TkApp) DyBase(io.wring.dynamo.DyBase) Base(io.wring.model.Base)

Example 2 with Base

use of io.wring.model.Base in project wring by yegor256.

the class CycleTest method processesSinglePipe.

/**
 * Cycle can process a single pipe.
 * @throws Exception If some problem inside
 */
@Test
public void processesSinglePipe() throws Exception {
    final Base base = new FkBase();
    final Pipe pipe = new FkPipe();
    new Cycle(base).exec(pipe);
}
Also used : FkBase(io.wring.fake.FkBase) Pipe(io.wring.model.Pipe) FkPipe(io.wring.fake.FkPipe) Base(io.wring.model.Base) FkBase(io.wring.fake.FkBase) FkPipe(io.wring.fake.FkPipe) Test(org.junit.Test)

Example 3 with Base

use of io.wring.model.Base in project wring by yegor256.

the class CycleTest method processesSinglePipeWithBrokenJson.

/**
 * Cycle can process a single pipe with broken JSOn.
 * @throws Exception If some problem inside
 */
@Test
public void processesSinglePipeWithBrokenJson() throws Exception {
    final Base base = new FkBase();
    final Pipe pipe = new FkPipe(new Directives().add("pipe").add("urn").set("urn:test:1").up().add("json").set("{\"a\":\"/@[a-z0-9\\\\-]\\\\s+\"}").up().up());
    new Cycle(base).exec(pipe);
}
Also used : FkBase(io.wring.fake.FkBase) Directives(org.xembly.Directives) Pipe(io.wring.model.Pipe) FkPipe(io.wring.fake.FkPipe) Base(io.wring.model.Base) FkBase(io.wring.fake.FkBase) FkPipe(io.wring.fake.FkPipe) Test(org.junit.Test)

Aggregations

Base (io.wring.model.Base)3 FkBase (io.wring.fake.FkBase)2 FkPipe (io.wring.fake.FkPipe)2 Pipe (io.wring.model.Pipe)2 Test (org.junit.Test)2 Routine (io.wring.agents.Routine)1 DyBase (io.wring.dynamo.DyBase)1 TkApp (io.wring.tk.TkApp)1 FtCli (org.takes.http.FtCli)1 Directives (org.xembly.Directives)1