コード例 #1
0
  @Test
  public void isValidNoId() {
    ValidationResult result = SummaryApplicationRequest.builder().build().isValid();

    assertEquals(INVALID, result.getStatus());
    assertEquals("application id must be specified", result.getMessages().get(0));
  }
コード例 #2
0
  @Test
  public void isValidNoId() {
    ValidationResult result = UpdateServiceBrokerRequest.builder().build().isValid();

    assertEquals(INVALID, result.getStatus());
    assertEquals("service broker id must be specified", result.getMessages().get(0));
  }
コード例 #3
0
  @Test
  public void isValidNoId() {
    ValidationResult result = ListSpaceAuditorsRequest.builder().build().isValid();

    assertEquals(INVALID, result.getStatus());
    assertEquals("space id must be specified", result.getMessages().get(0));
  }
コード例 #4
0
  @Test
  public void isValid() {
    ValidationResult result =
        SummaryApplicationRequest.builder().applicationId("test-application-id").build().isValid();

    assertEquals(VALID, result.getStatus());
  }
コード例 #5
0
  @Test
  public void isValid() {
    ValidationResult result =
        ListSpaceAuditorsRequest.builder().spaceId("test-space-id").build().isValid();

    assertEquals(VALID, result.getStatus());
  }
コード例 #6
0
  @Test
  public void isValid() {
    ValidationResult result =
        UpdateServiceBrokerRequest.builder()
            .serviceBrokerId("test-service-broker-id")
            .build()
            .isValid();

    assertEquals(VALID, result.getStatus());
  }
  @Test
  public void isValidNoUsername() {
    ValidationResult result =
        RemoveOrganizationBillingManagerByUsernameRequest.builder()
            .organizationId("test-organization-id")
            .build()
            .isValid();

    assertEquals(INVALID, result.getStatus());
    assertEquals("username must be specified", result.getMessages().get(0));
  }
  @Test
  public void isValid() {
    ValidationResult result =
        RemoveOrganizationBillingManagerByUsernameRequest.builder()
            .organizationId("test-organization-id")
            .username("test-username")
            .build()
            .isValid();

    assertEquals(VALID, result.getStatus());
  }
コード例 #9
0
  @Test
  public void isValidNoId() {
    ValidationResult result =
        UpdateOrganizationRequest.builder()
            .name("test-name")
            .quotaDefinitionId("test-quota-definition-id")
            .status("test-status")
            .build()
            .isValid();

    assertEquals(INVALID, result.getStatus());
    assertEquals("organization id must be specified", result.getMessages().get(0));
  }
コード例 #10
0
  @Test
  public void isValid() {
    ValidationResult result =
        UpdateOrganizationRequest.builder()
            .organizationId("test-organization-id")
            .name("test-name")
            .quotaDefinitionId("test-quota-definition-id")
            .status("test-status")
            .build()
            .isValid();

    assertEquals(VALID, result.getStatus());
  }
  @Override
  public ValidationResult isValid() {
    ValidationResult.ValidationResultBuilder builder = ValidationResult.builder();

    if (this.serviceInstanceId == null) {
      builder.message("service instance id must be specified");
    }

    return builder.build();
  }
コード例 #12
0
  @Override
  public ValidationResult isValid() {
    ValidationResult.ValidationResultBuilder builder = ValidationResult.builder();

    if (this.name == null) {
      builder.message("name must be specified");
    }

    return builder.build();
  }
  @Override
  public ValidationResult isValid() {
    ValidationResult.ValidationResultBuilder builder = ValidationResult.builder();

    if (this.organizationId == null) {
      builder.message("organization id must be specified");
    }

    if (this.username == null) {
      builder.message("username must be specified");
    }

    return builder.build();
  }
コード例 #14
0
  @Override
  public ValidationResult isValid() {
    ValidationResult.ValidationResultBuilder builder = ValidationResult.builder();

    if (this.applicationId == null) {
      builder.message("application id must be specified");
    }

    if (this.index == null) {
      builder.message("index must be specified");
    }

    return builder.build();
  }
コード例 #15
0
  @Override
  public ValidationResult isValid() {
    ValidationResult.ValidationResultBuilder builder = ValidationResult.builder();

    if (this.developerId == null) {
      builder.message("developer id must be specified");
    }

    if (this.spaceId == null) {
      builder.message("space id must be specified");
    }

    return builder.build();
  }