2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2018 Ericsson. All rights reserved.
6 * Modifications Copyright (C) 2018-2020 AT&T. All rights reserved.
7 * Modifications Copyright (C) 2019 Nordix Foundation.
8 * Modifications Copyright (C) 2020 Wipro Limited.
9 * ================================================================================
10 * Licensed under the Apache License, Version 2.0 (the "License");
11 * you may not use this file except in compliance with the License.
12 * You may obtain a copy of the License at
14 * http://www.apache.org/licenses/LICENSE-2.0
16 * Unless required by applicable law or agreed to in writing, software
17 * distributed under the License is distributed on an "AS IS" BASIS,
18 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 * See the License for the specific language governing permissions and
20 * limitations under the License.
21 * ============LICENSE_END=========================================================
24 package org.onap.policy.controlloop.actor.so;
26 import static org.junit.Assert.assertEquals;
28 import java.util.Arrays;
29 import java.util.stream.Collectors;
30 import org.junit.Test;
31 import org.onap.policy.controlloop.actor.test.BasicActor;
33 public class SoActorTest extends BasicActor {
36 public void testConstructor() {
37 SoActor prov = new SoActor();
39 // verify that it has the operators we expect
40 var expected = Arrays.asList(VfModuleCreate.NAME, VfModuleDelete.NAME, ModifyNssi.NAME, ModifyCll.NAME).stream()
41 .sorted().collect(Collectors.toList());
42 var actual = prov.getOperationNames().stream().sorted().collect(Collectors.toList());
44 assertEquals(expected.toString(), actual.toString());
48 public void testActorService() {
49 // verify that it all plugs into the ActorService
50 verifyActorService(SoActor.NAME, "service.yaml");