Search in sources :

Example 1 with ListFunctions

use of org.apache.pulsar.admin.cli.CmdFunctions.ListFunctions in project incubator-pulsar by apache.

the class CmdFunctionsTest method testListFunctions.

@Test
public void testListFunctions() throws Exception {
    String tenant = TEST_NAME + "-tenant";
    String namespace = TEST_NAME + "-namespace";
    cmd.run(new String[] { "list", "--tenant", tenant, "--namespace", namespace });
    ListFunctions lister = cmd.getLister();
    assertEquals(tenant, lister.getTenant());
    assertEquals(namespace, lister.getNamespace());
    verify(functions, times(1)).getFunctions(eq(tenant), eq(namespace));
}
Also used : ListFunctions(org.apache.pulsar.admin.cli.CmdFunctions.ListFunctions) Matchers.anyString(org.mockito.Matchers.anyString) Test(org.testng.annotations.Test) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest)

Aggregations

ListFunctions (org.apache.pulsar.admin.cli.CmdFunctions.ListFunctions)1 Matchers.anyString (org.mockito.Matchers.anyString)1 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)1 Test (org.testng.annotations.Test)1