aboutsummaryrefslogtreecommitdiffstats
path: root/adapters
diff options
context:
space:
mode:
authorSumapriya <SS00493505@techmahindra.com>2018-03-14 10:30:14 +0530
committerSumapriya <SS00493505@techmahindra.com>2018-03-14 10:30:14 +0530
commit31766a14a51d34d7ef9a74b61d54928d3c63d5f8 (patch)
treecea9b3db092e18cce528afa4538230398bf9332d /adapters
parent5393043e5151f1f0f536fcf8b6f864265fb96e03 (diff)
Adding Junit
Adding Junit for: ApplicationException.java Sonar-Link: https://sonar.onap.org/code?id=org.onap.so%3Aso&selected=org.onap.so.adapters%3Amso-vfc-adapter%3Asrc%2Fmain%2Fjava%2Forg%2Fopenecomp%2Fmso%2Fadapters%2Fvfc%2Fexceptions%2FApplicationException.java Change-Id: I4a65874b63aa98aacbaabf6961c89ec500dc85d9 Issue-ID: SO-479 Signed-off-by: Sumapriya <SS00493505@techmahindra.com>
Diffstat (limited to 'adapters')
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/openecomp/mso/adapters/vfc/exceptions/ApplicationExceptionTest.java42
1 files changed, 42 insertions, 0 deletions
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/openecomp/mso/adapters/vfc/exceptions/ApplicationExceptionTest.java b/adapters/mso-vfc-adapter/src/test/java/org/openecomp/mso/adapters/vfc/exceptions/ApplicationExceptionTest.java
new file mode 100644
index 0000000000..231e210bbe
--- /dev/null
+++ b/adapters/mso-vfc-adapter/src/test/java/org/openecomp/mso/adapters/vfc/exceptions/ApplicationExceptionTest.java
@@ -0,0 +1,42 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : SO
+* ================================================================================
+* Copyright 2018 TechMahindra
+*=================================================================================
+* 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.openecomp.mso.adapters.vfc.exceptions;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+public class ApplicationExceptionTest {
+ private ApplicationException application = new ApplicationException(0,null);
+
+ @Test
+ public void testApplicationException() {
+ application.setErrorCode(0);
+ application.setErrorMsg("ErrorMsg");
+ assertEquals(application.getErrorCode(), 0);
+ assertEquals(application.getErrorMsg(), "ErrorMsg");
+ }
+
+ @Test
+ public void testbuildErrorResponse(){
+ assert(application.buildErrorResponse()!=null);
+ }
+}