diff options
Diffstat (limited to 'src/test/java/org/onap/aai/validation/result/TestValidationResult.java')
-rw-r--r-- | src/test/java/org/onap/aai/validation/result/TestValidationResult.java | 49 |
1 files changed, 27 insertions, 22 deletions
diff --git a/src/test/java/org/onap/aai/validation/result/TestValidationResult.java b/src/test/java/org/onap/aai/validation/result/TestValidationResult.java index 3462418..7ce0b34 100644 --- a/src/test/java/org/onap/aai/validation/result/TestValidationResult.java +++ b/src/test/java/org/onap/aai/validation/result/TestValidationResult.java @@ -1,19 +1,22 @@ /** - * ============LICENSE_START=================================================== + * ============LICENSE_START======================================================= + * org.onap.aai + * ================================================================================ + * Copyright (c) 2018-2019 AT&T Intellectual Property. All rights reserved. * Copyright (c) 2018-2019 European Software Marketing Ltd. - * ============================================================================ + * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ============LICENSE_END===================================================== + * ============LICENSE_END========================================================= */ package org.onap.aai.validation.result; @@ -198,14 +201,14 @@ public class TestValidationResult { Map<String, Object> violationDetails = new HashMap<>(); //@formatter:off - Violation violation = new Violation.Builder(entity) - .category("category") - .severity("severity") - .violationType("violationType") - .violationDetails(violationDetails) - .errorMessage("errorMessage") - .build(); - //@formatter:on + Violation violation = new Violation.Builder(entity) + .category("category") + .severity("severity") + .violationType("violationType") + .violationDetails(violationDetails) + .errorMessage("errorMessage") + .build(); + //@formatter:on validationResult.addViolation(violation); assertThat(validationResult, is(not(equalTo(other)))); @@ -385,14 +388,14 @@ public class TestValidationResult { ValidationResult validationResult = new ValidationResultBuilder(eventReader, vserverEvent).build(); //@formatter:off - Violation violation = new Violation.Builder(entity) - .category("category") - .severity("severity") - .violationType("violationType") - .violationDetails(violationDetails) - .errorMessage("errorMessage") - .build(); - //@formatter:on + Violation violation = new Violation.Builder(entity) + .category("category") + .severity("severity") + .violationType("violationType") + .violationDetails(violationDetails) + .errorMessage("errorMessage") + .build(); + //@formatter:on validationResult.addViolation(violation); @@ -411,8 +414,10 @@ public class TestValidationResult { assertThat(validationResult.getEntityId(), is(expectedEntityId)); assertThat(validationResult.getEntityType(), is("vserver")); assertThat(validationResult.getResourceVersion(), is("1464193654")); - assertThat(validationResult.getEntityLink(), is("cloud-infrastructure/cloud-regions/cloud-region/region1/" - + "AAIregion1/tenants/tenant/example-tenant-id-val-88551/vservers/vserver/example-vserver-id-val-34666")); + assertThat(validationResult.getEntityLink(), + is("cloud-infrastructure/cloud-regions/cloud-region/region1/" + + "AAIregion1/tenants/tenant/example-tenant-id-val-88551" + + "/vservers/vserver/example-vserver-id-val-34666")); } private Violation assertThatViolationIsValid(ValidationResult validationResult, Violation expectedViolation) { |