From e168ce2fad71650ad730519c772a9b093c0a8f43 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Wed, 28 Apr 2021 15:45:22 -0400 Subject: Remove GroupValidationResult Removed GroupValidationResult, replacing it with BeanValidationResult. Modified the ParameterGroup subclasses to use BeanValidator, adding annotations where needed to trigger the validations that had been automatically performed by GroupValidationResult. Issue-ID: POLICY-2059 Change-Id: I2c0c01fac355e6cde4d8d6998dc42f8a2e2ebb65 Signed-off-by: Jim Hahn --- .../event/carrier/grpc/GrpcCarrierTechnologyParametersTest.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-grpc') diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-grpc/src/test/java/org/onap/policy/apex/plugins/event/carrier/grpc/GrpcCarrierTechnologyParametersTest.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-grpc/src/test/java/org/onap/policy/apex/plugins/event/carrier/grpc/GrpcCarrierTechnologyParametersTest.java index 480d8423b..7c79e95b6 100644 --- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-grpc/src/test/java/org/onap/policy/apex/plugins/event/carrier/grpc/GrpcCarrierTechnologyParametersTest.java +++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-grpc/src/test/java/org/onap/policy/apex/plugins/event/carrier/grpc/GrpcCarrierTechnologyParametersTest.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2020 Nordix Foundation. + * Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,7 +29,7 @@ import org.assertj.core.api.Assertions; import org.junit.Before; import org.junit.Test; import org.onap.policy.apex.service.engine.event.ApexEventException; -import org.onap.policy.common.parameters.GroupValidationResult; +import org.onap.policy.common.parameters.ValidationResult; public class GrpcCarrierTechnologyParametersTest { @@ -45,7 +46,7 @@ public class GrpcCarrierTechnologyParametersTest { @Test public void testGrpcCarrierTechnologyParameters_invalid_producer_params() throws ApexEventException { - GroupValidationResult result = params.validate(); + ValidationResult result = params.validate(); assertTrue(result.isValid()); assertThatThrownBy(() -> params.validateGrpcParameters(true)) .hasMessage("Issues in specifying gRPC Producer parameters:\ntimeout should have a positive value.\n" @@ -64,7 +65,7 @@ public class GrpcCarrierTechnologyParametersTest { params.setPort(2233); params.setTimeout(1000); params.setUsername(USERNAME); - GroupValidationResult result = params.validate(); + ValidationResult result = params.validate(); assertTrue(result.isValid()); Assertions.assertThatCode(() -> params.validateGrpcParameters(true)).doesNotThrowAnyException(); } @@ -77,7 +78,7 @@ public class GrpcCarrierTechnologyParametersTest { params.setUsername(USERNAME); params.setPort(23); // invalid value - GroupValidationResult result = params.validate(); + ValidationResult result = params.validate(); assertTrue(result.isValid()); assertThatThrownBy(() -> params.validateGrpcParameters(true)) .hasMessageContaining("port range should be between 1024 and 65535"); -- cgit 1.2.3-korg