Adding Junit
[so.git] / bpmn / MSOCommonBPMN / src / test / java / org / openecomp / mso / bpmn / common / adapter / vnf / RollbackVnfNotificationTest.java
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/adapter/vnf/RollbackVnfNotificationTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/adapter/vnf/RollbackVnfNotificationTest.java
new file mode 100644 (file)
index 0000000..c6602d3
--- /dev/null
@@ -0,0 +1,43 @@
+/*-\r
+ * ============LICENSE_START=======================================================\r
+ * ONAP - SO\r
+ * ================================================================================\r
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.\r
+ * ================================================================================\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ *      http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ * ============LICENSE_END=========================================================\r
+ */\r
+package org.openecomp.mso.bpmn.common.adapter.vnf;\r
+\r
+import static org.junit.Assert.assertEquals;\r
+import org.junit.Test;\r
+\r
+public class RollbackVnfNotificationTest {\r
+       private RollbackVnfNotification rvn = new RollbackVnfNotification();\r
+        MsoExceptionCategory mso= MsoExceptionCategory.OPENSTACK;\r
+       @Test\r
+       public void testRollbackVnfNotification() {\r
+               rvn.setMessageId("messageId");\r
+               rvn.setCompleted(true);\r
+               rvn.setException(mso);\r
+               rvn.setErrorMessage("errorMessage");\r
+               assertEquals(rvn.getMessageId(), "messageId");\r
+               assertEquals(rvn.isCompleted(), true);\r
+               assertEquals(rvn.getException(), mso);\r
+               assertEquals(rvn.getErrorMessage(), "errorMessage");\r
+       }\r
+       @Test\r
+       public void testtoString() {\r
+               assert(rvn.toString()!=null);\r
+       }\r
+}\r