diff options
author | Jim Hahn <jrh3@att.com> | 2021-04-28 15:45:22 -0400 |
---|---|---|
committer | Jim Hahn <jrh3@att.com> | 2021-05-03 15:44:08 -0400 |
commit | e168ce2fad71650ad730519c772a9b093c0a8f43 (patch) | |
tree | 8d97f8823eb4f97916b2c19909c6b13e6a008e4a /plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-grpc/src | |
parent | cb09008c4d252dbc9a62f3a1d0b463a74380aa77 (diff) |
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 <jrh3@att.com>
Diffstat (limited to 'plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-grpc/src')
-rw-r--r-- | plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-grpc/src/test/java/org/onap/policy/apex/plugins/event/carrier/grpc/GrpcCarrierTechnologyParametersTest.java | 9 |
1 files changed, 5 insertions, 4 deletions
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"); |