2 * ============LICENSE_START=======================================================
\r
4 * ================================================================================
\r
5 * Copyright 2018 TechMahindra
\r
6 *=================================================================================
\r
7 * Licensed under the Apache License, Version 2.0 (the "License");
\r
8 * you may not use this file except in compliance with the License.
\r
9 * You may obtain a copy of the License at
\r
11 * http://www.apache.org/licenses/LICENSE-2.0
\r
13 * Unless required by applicable law or agreed to in writing, software
\r
14 * distributed under the License is distributed on an "AS IS" BASIS,
\r
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
16 * See the License for the specific language governing permissions and
\r
17 * limitations under the License.
\r
18 * ============LICENSE_END=========================================================
\r
21 package org.openecomp.mso.bpmn.common.adapter.vnf;
\r
23 import static org.junit.Assert.*;
\r
24 import org.junit.Test;
\r
25 import org.openecomp.mso.bpmn.common.adapter.vnf.UpdateVnfNotification.Outputs;
\r
26 import org.openecomp.mso.bpmn.common.adapter.vnf.UpdateVnfNotification.Outputs.Entry;
\r
28 public class UpdateVnfNotificationTest {
\r
29 private UpdateVnfNotification updatevnf = new UpdateVnfNotification();
\r
30 MsoExceptionCategory mso;
\r
31 Outputs value= new Outputs();
\r
32 VnfRollback roll = new VnfRollback();
\r
33 private Entry entry = new Entry();
\r
36 public void testUpdateVnfNotification() {
\r
37 updatevnf.setMessageId("messageId");
\r
38 updatevnf.setCompleted(true);
\r
39 updatevnf.setException(mso);
\r
40 updatevnf.setErrorMessage("errorMessage");
\r
41 updatevnf.setOutputs(value);
\r
42 updatevnf.setRollback(roll);
\r
43 entry.setKey("key");
\r
44 entry.setValue("value");
\r
45 assertEquals(updatevnf.getMessageId(), "messageId");
\r
46 assertEquals(updatevnf.isCompleted(), true);
\r
47 assertEquals(updatevnf.getException(), mso);
\r
48 assertEquals(updatevnf.getErrorMessage(), "errorMessage");
\r
49 assertEquals(updatevnf.getOutputs(), value);
\r
50 assertEquals(updatevnf.getRollback(), roll);
\r
51 assertEquals(entry.getKey(), "key");
\r
52 assertEquals(entry.getValue(), "value");
\r
55 public void testtoString() {
\r
56 assert(updatevnf.toString()!= null);
\r
57 assert(entry.toString()!= null);
\r