@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)); }
@Test public void isValidNoId() { ValidationResult result = SummaryApplicationRequest.builder().build().isValid(); assertEquals(INVALID, result.getStatus()); assertEquals("application id must be specified", result.getMessages().get(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)); }
@Test public void isValid() { ValidationResult result = SummaryApplicationRequest.builder().applicationId("test-application-id").build().isValid(); assertEquals(VALID, result.getStatus()); }
@Test public void isValid() { ValidationResult result = ListSpaceAuditorsRequest.builder().spaceId("test-space-id").build().isValid(); assertEquals(VALID, result.getStatus()); }
@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()); }
@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)); }
@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()); }