diff options
author | 2018-03-28 16:25:06 +0530 | |
---|---|---|
committer | 2018-03-28 16:25:06 +0530 | |
commit | 369b4a17ca83d4b073628cbac6b9799d920e4c61 (patch) | |
tree | 7445f626b5b3ea38a32ec962ad3b68c479b7805d /mso-api-handlers/mso-requests-db/src/test/java/org/openecomp/mso/requestsdb/ResourceOperationStatusTest.java | |
parent | 9a9708b6b2a68d13449205456403a75d60fa9e03 (diff) |
Junit for mso.requestsdb
Adding Junit for:
1.InfraRequests.java
2.OperationalEnvDistributionStatus.java
3.OperationalEnvServiceModelStatus.java
4.OperationStatus.java
5.ResourceOperationStatus.java
6.SiteStatus.java
7.WatchdogComponentDistributionStatus.java
8.WatchdogDistributionStatus.java
9.WatchdogServiceModVerIdLookup.java
Sonar link:
https://sonar.onap.org/code?id=org.onap.so%3Aso&selected=org.onap.so%3Amso-requests-db%3Asrc%2Fmain%2Fjava%2Forg%2Fopenecomp%2Fmso%2Frequestsdb
Change-Id: I5059fd48b3f33b00a256eeadf00d6d181b78cb1f
Issue-ID: SO-540
Signed-off-by: SP00501638 <SP00501638@techmahindra.com>
Diffstat (limited to 'mso-api-handlers/mso-requests-db/src/test/java/org/openecomp/mso/requestsdb/ResourceOperationStatusTest.java')
-rw-r--r-- | mso-api-handlers/mso-requests-db/src/test/java/org/openecomp/mso/requestsdb/ResourceOperationStatusTest.java | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/mso-api-handlers/mso-requests-db/src/test/java/org/openecomp/mso/requestsdb/ResourceOperationStatusTest.java b/mso-api-handlers/mso-requests-db/src/test/java/org/openecomp/mso/requestsdb/ResourceOperationStatusTest.java new file mode 100644 index 0000000000..a9773c3bae --- /dev/null +++ b/mso-api-handlers/mso-requests-db/src/test/java/org/openecomp/mso/requestsdb/ResourceOperationStatusTest.java @@ -0,0 +1,58 @@ +/* +* ============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.requestsdb; + +import static org.junit.Assert.*; + +import org.junit.Test; + +public class ResourceOperationStatusTest { + + ResourceOperationStatus ros=new ResourceOperationStatus(); + ResourceOperationStatus ros1=new ResourceOperationStatus("serviceId", "operationId", "resourceTemplateUUID"); + Object obj=new Object(); + @Test + public void test() { + ros.setErrorCode("errorCode"); + ros.setJobId("jobId"); + ros.setOperationId("operationId"); + ros.setOperType("operType"); + ros.setProgress("progress"); + ros.setResourceInstanceID("resourceInstanceID"); + ros.setResourceTemplateUUID("resourceTemplateUUId"); + ros.setServiceId("serviceId"); + ros.setStatus("101"); + ros.setStatusDescription("statusDescription"); + + assertEquals(ros.getErrorCode(), "errorCode"); + assertEquals(ros.getJobId(), "jobId"); + assertEquals(ros.getOperationId(), "operationId"); + assertEquals(ros.getOperType(), "operType"); + assertEquals(ros.getProgress(), "progress"); + assertEquals(ros.getResourceInstanceID(), "resourceInstanceID"); + assertEquals(ros.getResourceTemplateUUID(), "resourceTemplateUUId"); + assertEquals(ros.getServiceId(), "serviceId"); + assertEquals(ros.getStatus(), "101"); + assertEquals(ros.getStatusDescription(), "statusDescription"); + ros.equals(obj); + ros.hashCode(); + } + +} |