diff options
Diffstat (limited to 'main/src/test/java/org/onap/policy/distribution/main/testclasses/DummyReceptionHandlerParameterGroup.java')
-rw-r--r-- | main/src/test/java/org/onap/policy/distribution/main/testclasses/DummyReceptionHandlerParameterGroup.java | 77 |
1 files changed, 12 insertions, 65 deletions
diff --git a/main/src/test/java/org/onap/policy/distribution/main/testclasses/DummyReceptionHandlerParameterGroup.java b/main/src/test/java/org/onap/policy/distribution/main/testclasses/DummyReceptionHandlerParameterGroup.java index 20f433d0..649d7f4a 100644 --- a/main/src/test/java/org/onap/policy/distribution/main/testclasses/DummyReceptionHandlerParameterGroup.java +++ b/main/src/test/java/org/onap/policy/distribution/main/testclasses/DummyReceptionHandlerParameterGroup.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2019 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,79 +21,25 @@ package org.onap.policy.distribution.main.testclasses; -import org.onap.policy.common.parameters.GroupValidationResult; +import lombok.Getter; +import lombok.Setter; + +import org.onap.policy.common.parameters.annotations.NotBlank; +import org.onap.policy.common.parameters.annotations.NotNull; import org.onap.policy.distribution.reception.parameters.ReceptionHandlerConfigurationParameterGroup; +@Getter +@Setter +@NotNull +@NotBlank public class DummyReceptionHandlerParameterGroup extends ReceptionHandlerConfigurationParameterGroup { private String myStringParameter; private int myIntegerParameter; private boolean myBooleanParameter; - /** - * Inner static class is to used as a Builder. - * - */ - public static class DummyReceptionHandlerParameterGroupBuilder { - private String myStringParameter; - private int myIntegerParameter; - private boolean myBooleanParameter; - - public DummyReceptionHandlerParameterGroupBuilder setMyStringParameter(final String val) { - myStringParameter = val; - return this; - } - - public DummyReceptionHandlerParameterGroupBuilder setMyIntegerParameter(final int val) { - myIntegerParameter = val; - return this; - } - - public DummyReceptionHandlerParameterGroupBuilder setMyBooleanParameter(final boolean val) { - myBooleanParameter = val; - return this; - } - - /** - * Creates a new DummyReceptionHandlerConfigurationParameterGroup instance. - */ - public DummyReceptionHandlerParameterGroup build() { - return new DummyReceptionHandlerParameterGroup(this); - } - } - - /** - * The constructor for instantiating PssdConfigurationParameterGroup. It is kept private so that - * it could only be called by PssdConfigurationBuilder. - * - * @param builder stores all the values used by PssdConfigurationParametersGroup - */ - private DummyReceptionHandlerParameterGroup(final DummyReceptionHandlerParameterGroupBuilder builder) { - myStringParameter = builder.myStringParameter; - myIntegerParameter = builder.myIntegerParameter; - myBooleanParameter = builder.myBooleanParameter; - } - - public String getMyStringParameter() { - return myStringParameter; + public DummyReceptionHandlerParameterGroup() { + super(DummyReceptionHandlerParameterGroup.class.getSimpleName()); } - - public int getMyIntegerParameter() { - return myIntegerParameter; - } - - public boolean isMyBooleanParameter() { - return myBooleanParameter; - } - - - /** - * {@inheritDoc}. - */ - @Override - public GroupValidationResult validate() { - return new GroupValidationResult(this); - } - } |