diff options
Diffstat (limited to 'models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/ControlLoopTargetTypeTest.java')
-rw-r--r-- | models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/ControlLoopTargetTypeTest.java | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/ControlLoopTargetTypeTest.java b/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/ControlLoopTargetTypeTest.java new file mode 100644 index 000000000..d1412fe49 --- /dev/null +++ b/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/ControlLoopTargetTypeTest.java @@ -0,0 +1,40 @@ +/*- + * ============LICENSE_START======================================================= + * controlloop + * ================================================================================ + * Copyright (C) 2018-2019 AT&T Intellectual Property. 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. + * You may obtain a copy of the License at + * + * 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========================================================= + */ + +package org.onap.policy.controlloop; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; + +import org.junit.Test; + +public class ControlLoopTargetTypeTest { + + @Test + public void test() { + assertEquals(ControlLoopTargetType.VM, ControlLoopTargetType.toType("VM")); + assertEquals(ControlLoopTargetType.VF, ControlLoopTargetType.toType("VF")); + assertEquals(ControlLoopTargetType.VFC, ControlLoopTargetType.toType("VFC")); + assertEquals(ControlLoopTargetType.VNF, ControlLoopTargetType.toType("VNF")); + + assertNull(ControlLoopTargetType.toType("foo")); + } +} |