Search in sources :

Example 1 with DefaultStellarShellExecutor

use of org.apache.metron.stellar.common.shell.DefaultStellarShellExecutor in project metron by apache.

the class AssignmentCommandTest method setup.

@Before
public void setup() throws Exception {
    command = new AssignmentCommand();
    // setup the executor
    Properties props = new Properties();
    executor = new DefaultStellarShellExecutor(props, Optional.empty());
    executor.init();
}
Also used : Properties(java.util.Properties) DefaultStellarShellExecutor(org.apache.metron.stellar.common.shell.DefaultStellarShellExecutor) Before(org.junit.Before)

Example 2 with DefaultStellarShellExecutor

use of org.apache.metron.stellar.common.shell.DefaultStellarShellExecutor in project metron by apache.

the class CommentTest method setup.

@Before
public void setup() throws Exception {
    // setup the %magic
    magic = new Comment();
    // setup the executor
    Properties props = new Properties();
    executor = new DefaultStellarShellExecutor(props, Optional.empty());
    executor.init();
}
Also used : Properties(java.util.Properties) DefaultStellarShellExecutor(org.apache.metron.stellar.common.shell.DefaultStellarShellExecutor) Before(org.junit.Before)

Example 3 with DefaultStellarShellExecutor

use of org.apache.metron.stellar.common.shell.DefaultStellarShellExecutor in project metron by apache.

the class MagicDefineGlobalTest method setup.

@Before
public void setup() throws Exception {
    // setup the %magic
    magic = new MagicDefineGlobal();
    // setup the executor
    Properties props = new Properties();
    executor = new DefaultStellarShellExecutor(props, Optional.empty());
    executor.init();
}
Also used : Properties(java.util.Properties) DefaultStellarShellExecutor(org.apache.metron.stellar.common.shell.DefaultStellarShellExecutor) Before(org.junit.Before)

Example 4 with DefaultStellarShellExecutor

use of org.apache.metron.stellar.common.shell.DefaultStellarShellExecutor in project metron by apache.

the class MagicListFunctionsTest method setup.

@Before
public void setup() throws Exception {
    // setup the %magic
    magic = new MagicListFunctions();
    // setup a function resolver - only 3 functions have been defined
    SimpleFunctionResolver functionResolver = new SimpleFunctionResolver().withClass(StringFunctions.ToString.class).withClass(StringFunctions.ToLower.class).withClass(StringFunctions.ToUpper.class);
    // setup the executor
    Properties props = new Properties();
    executor = new DefaultStellarShellExecutor(functionResolver, props, Optional.empty());
    executor.init();
}
Also used : StringFunctions(org.apache.metron.stellar.dsl.functions.StringFunctions) SimpleFunctionResolver(org.apache.metron.stellar.dsl.functions.resolver.SimpleFunctionResolver) Properties(java.util.Properties) DefaultStellarShellExecutor(org.apache.metron.stellar.common.shell.DefaultStellarShellExecutor) Before(org.junit.Before)

Example 5 with DefaultStellarShellExecutor

use of org.apache.metron.stellar.common.shell.DefaultStellarShellExecutor in project metron by apache.

the class MagicListGlobalsTest method setup.

@Before
public void setup() throws Exception {
    // setup the %magic
    magic = new MagicListGlobals();
    // setup the executor
    Properties props = new Properties();
    executor = new DefaultStellarShellExecutor(props, Optional.empty());
    executor.init();
}
Also used : Properties(java.util.Properties) DefaultStellarShellExecutor(org.apache.metron.stellar.common.shell.DefaultStellarShellExecutor) Before(org.junit.Before)

Aggregations

DefaultStellarShellExecutor (org.apache.metron.stellar.common.shell.DefaultStellarShellExecutor)10 Properties (java.util.Properties)9 Before (org.junit.Before)8 StellarShellExecutor (org.apache.metron.stellar.common.shell.StellarShellExecutor)2 StringFunctions (org.apache.metron.stellar.dsl.functions.StringFunctions)2 SimpleFunctionResolver (org.apache.metron.stellar.dsl.functions.resolver.SimpleFunctionResolver)2