use of org.apache.pulsar.functions.api.utils.IdentityFunction in project pulsar by apache.
the class CmdFunctionsTest method testCreateFunctionWithoutBasicArguments.
@Test
public void testCreateFunctionWithoutBasicArguments() throws Exception {
cmd.run(new String[] { "create", "--inputs", INPUT_TOPIC_NAME, "--output", OUTPUT_TOPIC_NAME, "--jar", URL, "--className", IdentityFunction.class.getName() });
CreateFunction creater = cmd.getCreater();
assertEquals("IdentityFunction", creater.getFunctionConfig().getName());
assertEquals("public", creater.getFunctionConfig().getTenant());
assertEquals("default", creater.getFunctionConfig().getNamespace());
assertEquals(INPUT_TOPIC_NAME, creater.getInputs());
assertEquals(OUTPUT_TOPIC_NAME, creater.getOutput());
verify(functions, times(1)).createFunctionWithUrl(any(FunctionConfig.class), anyString());
}
use of org.apache.pulsar.functions.api.utils.IdentityFunction in project incubator-pulsar by apache.
the class CmdFunctionsTest method testCreateFunctionWithoutBasicArguments.
@Test
public void testCreateFunctionWithoutBasicArguments() throws Exception {
cmd.run(new String[] { "create", "--inputs", INPUT_TOPIC_NAME, "--output", OUTPUT_TOPIC_NAME, "--jar", URL, "--className", IdentityFunction.class.getName() });
CreateFunction creater = cmd.getCreater();
assertEquals("IdentityFunction", creater.getFunctionConfig().getName());
assertEquals("public", creater.getFunctionConfig().getTenant());
assertEquals("default", creater.getFunctionConfig().getNamespace());
assertEquals(INPUT_TOPIC_NAME, creater.getInputs());
assertEquals(OUTPUT_TOPIC_NAME, creater.getOutput());
verify(functions, times(1)).createFunctionWithUrl(any(FunctionConfig.class), anyString());
}
use of org.apache.pulsar.functions.api.utils.IdentityFunction in project pulsar by yahoo.
the class CmdFunctionsTest method testCreateFunctionWithoutBasicArguments.
@Test
public void testCreateFunctionWithoutBasicArguments() throws Exception {
cmd.run(new String[] { "create", "--inputs", INPUT_TOPIC_NAME, "--output", OUTPUT_TOPIC_NAME, "--jar", URL, "--className", IdentityFunction.class.getName() });
CreateFunction creater = cmd.getCreater();
assertEquals("IdentityFunction", creater.getFunctionConfig().getName());
assertEquals("public", creater.getFunctionConfig().getTenant());
assertEquals("default", creater.getFunctionConfig().getNamespace());
assertEquals(INPUT_TOPIC_NAME, creater.getInputs());
assertEquals(OUTPUT_TOPIC_NAME, creater.getOutput());
verify(functions, times(1)).createFunctionWithUrl(any(FunctionConfig.class), anyString());
}
Aggregations