Fix the name of SO processing class in Policy
[policy/models.git] / models-interactions / model-actors / actor.so / src / test / java / org / onap / policy / controlloop / actor / so / SoActorTest.java
1 /*
2  * ============LICENSE_START=======================================================
3  * ONAP
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
13  *
14  *      http://www.apache.org/licenses/LICENSE-2.0
15  *
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=========================================================
22  */
23
24 package org.onap.policy.controlloop.actor.so;
25
26 import static org.junit.Assert.assertEquals;
27
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;
32
33 public class SoActorTest extends BasicActor {
34
35     @Test
36     public void testConstructor() {
37         SoActor prov = new SoActor();
38
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());
43
44         assertEquals(expected.toString(), actual.toString());
45     }
46
47     @Test
48     public void testActorService() {
49         // verify that it all plugs into the ActorService
50         verifyActorService(SoActor.NAME, "service.yaml");
51     }
52 }