Exemplo n.º 1
0
  public static Clusters getClustersDetails() {
    Cluster cluster = new Cluster();
    cluster.setDataCenter(DataCenter.DFW);
    cluster.setDescription("aDesc");
    cluster.setName("aClusterName");

    Cluster cluster2 = new Cluster();
    cluster2.setDataCenter((DataCenter) rndChoice(DataCenter.values()));
    cluster2.setDescription("aDesc");
    cluster2.setName("aSecondCluster");

    Clusters clusters = new Clusters();
    clusters.getClusters().add(cluster);
    clusters.getClusters().add(cluster2);

    return clusters;
  }
Exemplo n.º 2
0
    @Before
    public void setUpValidObject() {
      cTest = new ClusterValidator();

      cluster = new Cluster();
      cluster.setDescription("a-desc");
      cluster.setName("aName");
    }
Exemplo n.º 3
0
    @Before
    public void standUp() {
      cTest = new ClusterValidator();

      cluster = new Cluster();
      cluster.setDescription("a-new-cluster");
      cluster.setName("a-cluster-name");
      cluster.setDataCenter(DataCenter.DFW);
      cluster.setUsername("username");
      cluster.setPassword("password");
    }
Exemplo n.º 4
0
 @Test
 public void shouldRejectNullName() {
   cluster.setName(null);
   ValidatorResult result = cTest.validate(cluster, POST);
   assertFalse(resultMessage(result, POST), result.passedValidation());
 }