use of org.apache.pulsar.admin.cli.CmdFunctions.GetFunction in project incubator-pulsar by apache.
the class CmdFunctionsTest method testGetFunction.
@Test
public void testGetFunction() throws Exception {
String tenant = TEST_NAME + "-tenant";
String namespace = TEST_NAME + "-namespace";
String fnName = TEST_NAME + "-function";
cmd.run(new String[] { "get", "--name", fnName, "--tenant", tenant, "--namespace", namespace });
GetFunction getter = cmd.getGetter();
assertEquals(fnName, getter.getFunctionName());
assertEquals(tenant, getter.getTenant());
assertEquals(namespace, getter.getNamespace());
verify(functions, times(1)).getFunction(eq(tenant), eq(namespace), eq(fnName));
}
Aggregations