Package org.apache.ambari.shell.completion

Examples of org.apache.ambari.shell.completion.Blueprint


  @Test
  public void testBuildClusterForNonExistingBlueprint() {
    when(client.doesBlueprintExist("id")).thenReturn(false);

    String result = clusterCommands.buildCluster(new Blueprint("id"));

    verify(client).doesBlueprintExist("id");
    assertEquals("Not a valid blueprint id", result);
  }
View Full Code Here


    when(client.doesBlueprintExist("id")).thenReturn(true);
    when(client.getBlueprintMap("id")).thenReturn(map);
    when(context.getFocusValue()).thenReturn("id");
    when(client.getHostNames()).thenReturn(hostNames);

    String result = clusterCommands.buildCluster(new Blueprint("id"));

    verify(client).doesBlueprintExist("id");
    verify(client).getBlueprintMap("id");
    verify(client).getHostGroups("id");
    assertEquals(String.format("%s\n%s", renderSingleMap(hostNames, "HOSTNAME", "STATE"),
View Full Code Here

    return Blueprint.class.isAssignableFrom(type);
  }

  @Override
  public Blueprint convertFromText(String value, Class<?> targetType, String optionContext) {
    return new Blueprint(value);
  }
View Full Code Here

TOP

Related Classes of org.apache.ambari.shell.completion.Blueprint

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.