summaryrefslogtreecommitdiffstats
path: root/adapters/mso-adapters-rest-interface/src/test
diff options
context:
space:
mode:
authorRob Daugherty <rd472p@att.com>2018-03-09 15:02:18 -0500
committerRob Daugherty <rd472p@att.com>2018-03-09 15:08:14 -0500
commit96b5a685d0c3afddb632e4a68ca7483f933b55dc (patch)
tree246399de05a3d429bf45ef1e5af2b9b0218d99f3 /adapters/mso-adapters-rest-interface/src/test
parent4475278c81668109b2b37a1d2720d8f2910641c4 (diff)
Revert Reduce log noise/warnings
This reverts commit 327b17ab250b4c17cf3f91f5e4cd9bffd89f3d1e. It is seriously impeding our ability complete the promised merge of AT&T 1802 code. While I'm all for coding standards, if we are serious about using spaces instead of tabs, then I think we need to (1) agree with the community when this will happen, (2) do consistently in all files, and (3) enforce it. Change-Id: Ib9b996f6b6c7d81ac9ac95d58b0c7d8cc39675ff Issue-ID: SO-368 Signed-off-by: Rob Daugherty <rd472p@att.com>
Diffstat (limited to 'adapters/mso-adapters-rest-interface/src/test')
-rw-r--r--adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/BeanTest.java713
-rw-r--r--adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/json/MapDeserializerTest.java1
-rw-r--r--adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/json/MapSerializerTest.java1
3 files changed, 356 insertions, 359 deletions
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/BeanTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/BeanTest.java
index 60026b0cd6..9efaee921f 100644
--- a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/BeanTest.java
+++ b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/BeanTest.java
@@ -23,7 +23,6 @@ import java.lang.reflect.Method;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
-
import org.junit.Test;
import org.openecomp.mso.adapters.nwrest.ContrailNetwork;
import org.openecomp.mso.adapters.nwrest.CreateNetworkError;
@@ -77,377 +76,377 @@ import org.openecomp.mso.entity.MsoRequest;
public class BeanTest {
- // Test cases for code coverage
- @Test
- public void testCreateNetworkRequest() {
- CreateNetworkRequest n = new CreateNetworkRequest();
- n.setBackout(true);
- n.setCloudSiteId("test");
- ContrailNetwork contrailNetwork = new ContrailNetwork("shared", "external", new ArrayList<>(),
- new ArrayList<>(), new ArrayList<>());
- contrailNetwork.setExternal("dgddb");
- contrailNetwork.setPolicyFqdns(new ArrayList<>());
- contrailNetwork.setRouteTableFqdns(new ArrayList<>());
- contrailNetwork.setRouteTargets(new ArrayList<>());
- contrailNetwork.setShared("test");
- n.setContrailNetwork(contrailNetwork);
- n.setFailIfExists(true);
- n.setMessageId("38829");
- n.setModelCustomizationUuid("4u838282");
- MsoRequest req = new MsoRequest();
- req.setRequestId("38849");
- req.setServiceInstanceId("3884839");
- n.setMsoRequest(req);
- n.setNetworkId("478383");
- n.setNetworkName("tetet");
- n.setNetworkParams(new HashMap<>());
- n.setNetworkTechnology("VMWARE");
- n.setNetworkType("tete");
- n.setNetworkTypeVersion("v1");
- n.setNotificationUrl("test");
- ProviderVlanNetwork providerVlanNetwork = new ProviderVlanNetwork("test", new ArrayList<>());
- providerVlanNetwork.setPhysicalNetworkName("physicalNetworkName");
- providerVlanNetwork.setVlans(new ArrayList<>());
- n.setProviderVlanNetwork(providerVlanNetwork);
- n.setSkipAAI(false);
- n.setSubnets(new ArrayList<>());
- n.setTenantId("tenantId");
- n.getBackout();
- n.getCloudSiteId();
- ContrailNetwork cn = n.getContrailNetwork();
- cn.getExternal();
- cn.getPolicyFqdns();
- cn.getRouteTableFqdns();
- cn.getRouteTargets();
- cn.getShared();
- n.getFailIfExists();
- n.getMessageId();
- n.getModelCustomizationUuid();
- n.getMsoRequest();
- n.getNetworkId();
- n.getNetworkName();
- n.getNetworkParams();
- n.getNetworkTechnology();
- n.getNetworkType();
- n.getNetworkTypeVersion();
- n.getNotificationUrl();
- n.getProviderVlanNetwork();
- n.getSkipAAI();
- n.getSubnets();
- n.getTenantId();
- n.isContrailRequest();
- n.isSynchronous();
- n.toJsonString();
- n.toXmlString();
- }
-
- @Test
- public void testDeleteNetworkRequest() {
- DeleteNetworkRequest r = new DeleteNetworkRequest();
- r.setCloudSiteId("test");
- r.setMessageId("messageId");
- r.setModelCustomizationUuid("modelCustomizationUuid");
- r.setMsoRequest(null);
- r.setNetworkId("networkId");
- r.setNetworkStackId("networkStackId");
- r.setNetworkType("networkType");
- r.setNotificationUrl("notificationUrl");
- r.setSkipAAI(true);
- r.setTenantId("tenantId");
- r.getCloudSiteId();
- r.getMessageId();
- r.getModelCustomizationUuid();
- r.getMsoRequest();
- r.getNetworkId();
- r.getNetworkStackId();
- r.getNetworkType();
- r.getNotificationUrl();
- r.getSkipAAI();
- r.getTenantId();
- }
+ // Test cases for code coverage
+ @Test
+ public void testCreateNetworkRequest() {
+ CreateNetworkRequest n = new CreateNetworkRequest();
+ n.setBackout(true);
+ n.setCloudSiteId("test");
+ ContrailNetwork contrailNetwork = new ContrailNetwork("shared", "external", new ArrayList<>(),
+ new ArrayList<>(), new ArrayList<>());
+ contrailNetwork.setExternal("dgddb");
+ contrailNetwork.setPolicyFqdns(new ArrayList<>());
+ contrailNetwork.setRouteTableFqdns(new ArrayList<>());
+ contrailNetwork.setRouteTargets(new ArrayList<>());
+ contrailNetwork.setShared("test");
+ n.setContrailNetwork(contrailNetwork);
+ n.setFailIfExists(true);
+ n.setMessageId("38829");
+ n.setModelCustomizationUuid("4u838282");
+ MsoRequest req = new MsoRequest();
+ req.setRequestId("38849");
+ req.setServiceInstanceId("3884839");
+ n.setMsoRequest(req);
+ n.setNetworkId("478383");
+ n.setNetworkName("tetet");
+ n.setNetworkParams(new HashMap<>());
+ n.setNetworkTechnology("VMWARE");
+ n.setNetworkType("tete");
+ n.setNetworkTypeVersion("v1");
+ n.setNotificationUrl("test");
+ ProviderVlanNetwork providerVlanNetwork = new ProviderVlanNetwork("test", new ArrayList<>());
+ providerVlanNetwork.setPhysicalNetworkName("physicalNetworkName");
+ providerVlanNetwork.setVlans(new ArrayList<>());
+ n.setProviderVlanNetwork(providerVlanNetwork);
+ n.setSkipAAI(false);
+ n.setSubnets(new ArrayList<>());
+ n.setTenantId("tenantId");
+ n.getBackout();
+ n.getCloudSiteId();
+ ContrailNetwork cn = n.getContrailNetwork();
+ cn.getExternal();
+ cn.getPolicyFqdns();
+ cn.getRouteTableFqdns();
+ cn.getRouteTargets();
+ cn.getShared();
+ n.getFailIfExists();
+ n.getMessageId();
+ n.getModelCustomizationUuid();
+ n.getMsoRequest();
+ n.getNetworkId();
+ n.getNetworkName();
+ n.getNetworkParams();
+ n.getNetworkTechnology();
+ n.getNetworkType();
+ n.getNetworkTypeVersion();
+ n.getNotificationUrl();
+ n.getProviderVlanNetwork();
+ n.getSkipAAI();
+ n.getSubnets();
+ n.getTenantId();
+ n.isContrailRequest();
+ n.isSynchronous();
+ n.toJsonString();
+ n.toXmlString();
+ }
- @Test
- public void testCreateNetworkError() {
- CreateNetworkError e = new CreateNetworkError("message");
- e = new CreateNetworkError("message", null, true, "messageid");
- DeleteNetworkError d = new DeleteNetworkError("message");
- d = new DeleteNetworkError("message", null, false, "29102");
- }
+ @Test
+ public void testDeleteNetworkRequest() {
+ DeleteNetworkRequest r = new DeleteNetworkRequest();
+ r.setCloudSiteId("test");
+ r.setMessageId("messageId");
+ r.setModelCustomizationUuid("modelCustomizationUuid");
+ r.setMsoRequest(null);
+ r.setNetworkId("networkId");
+ r.setNetworkStackId("networkStackId");
+ r.setNetworkType("networkType");
+ r.setNotificationUrl("notificationUrl");
+ r.setSkipAAI(true);
+ r.setTenantId("tenantId");
+ r.getCloudSiteId();
+ r.getMessageId();
+ r.getModelCustomizationUuid();
+ r.getMsoRequest();
+ r.getNetworkId();
+ r.getNetworkStackId();
+ r.getNetworkType();
+ r.getNotificationUrl();
+ r.getSkipAAI();
+ r.getTenantId();
+ }
- @Test
- public void testCreatenetworkResponse() {
- CreateNetworkResponse cnr = new CreateNetworkResponse("networkId", "neutronNetworkId", "networkStackId",
- "networkFqdn", false, null, null, "messageId");
- cnr.setMessageId("messageId");
- cnr.setNetworkCreated(true);
- cnr.setNetworkFqdn(null);
- cnr.setNetworkStackId(null);
- cnr.setNeutronNetworkId(null);
- cnr.setRollback(null);
- cnr.setNetworkStackId(null);
- cnr.setSubnetMap(null);
- cnr.getMessageId();
- cnr.getNetworkCreated();
- cnr.getNetworkFqdn();
- cnr.getNetworkId();
- cnr.getNetworkStackId();
- cnr.getNeutronNetworkId();
- cnr.getRollback();
- cnr.getSubnetMap();
+ @Test
+ public void testCreateNetworkError() {
+ CreateNetworkError e = new CreateNetworkError("message");
+ e = new CreateNetworkError("message", null, true, "messageid");
+ DeleteNetworkError d = new DeleteNetworkError("message");
+ d = new DeleteNetworkError("message", null, false, "29102");
+ }
- DeleteNetworkResponse dr = new DeleteNetworkResponse("networkId", true, "messageId");
- dr.setMessageId(null);
- dr.setNetworkDeleted(null);
- dr.setNetworkId(null);
- dr.getMessageId();
- dr.getNetworkDeleted();
- dr.getNetworkId();
+ @Test
+ public void testCreatenetworkResponse() {
+ CreateNetworkResponse cnr = new CreateNetworkResponse("networkId", "neutronNetworkId", "networkStackId",
+ "networkFqdn", false, null, null, "messageId");
+ cnr.setMessageId("messageId");
+ cnr.setNetworkCreated(true);
+ cnr.setNetworkFqdn(null);
+ cnr.setNetworkStackId(null);
+ cnr.setNeutronNetworkId(null);
+ cnr.setRollback(null);
+ cnr.setNetworkStackId(null);
+ cnr.setSubnetMap(null);
+ cnr.getMessageId();
+ cnr.getNetworkCreated();
+ cnr.getNetworkFqdn();
+ cnr.getNetworkId();
+ cnr.getNetworkStackId();
+ cnr.getNeutronNetworkId();
+ cnr.getRollback();
+ cnr.getSubnetMap();
- NetworkExceptionResponse ner = new NetworkExceptionResponse("message");
- ner = new NetworkExceptionResponse(null, null, false, null);
- ner.setCategory(null);
- ner.setMessage(null);
- ner.setRolledBack(null);
- ner.setMessageId(null);
- ner.getCategory();
- ner.getMessage();
- ner.getMessageId();
- ner.getRolledBack();
+ DeleteNetworkResponse dr = new DeleteNetworkResponse("networkId", true, "messageId");
+ dr.setMessageId(null);
+ dr.setNetworkDeleted(null);
+ dr.setNetworkId(null);
+ dr.getMessageId();
+ dr.getNetworkDeleted();
+ dr.getNetworkId();
- ner.toJsonString();
- ner.toXmlString();
- NetworkTechnology nt = NetworkTechnology.NEUTRON;
- ProviderVlanNetwork pvn = new ProviderVlanNetwork(null, null);
- pvn.setPhysicalNetworkName(null);
- pvn.setVlans(null);
- pvn.getPhysicalNetworkName();
- pvn.getVlans();
+ NetworkExceptionResponse ner = new NetworkExceptionResponse("message");
+ ner = new NetworkExceptionResponse(null, null, false, null);
+ ner.setCategory(null);
+ ner.setMessage(null);
+ ner.setRolledBack(null);
+ ner.setMessageId(null);
+ ner.getCategory();
+ ner.getMessage();
+ ner.getMessageId();
+ ner.getRolledBack();
- QueryNetworkResponse qnr = new QueryNetworkResponse(null, null, null, null, null);
- qnr.setNetworkExists(null);
- qnr.setNetworkId(null);
- qnr.setNetworkOutputs(null);
- qnr.setNetworkStackId(null);
- qnr.setNetworkStatus(null);
- qnr.setNeutronNetworkId(null);
- qnr.setRouteTargets(null);
- qnr.setSubnetIdMap(null);
- qnr.setVlans(null);
- qnr.getNetworkExists();
- qnr.getNetworkId();
- qnr.getNetworkOutputs();
- qnr.getNetworkStatus();
- qnr.getNeutronNetworkId();
- qnr.getRouteTargets();
- qnr.getSubnetIdMap();
- qnr.getVlans();
- qnr.toJsonString();
+ ner.toJsonString();
+ ner.toXmlString();
+ NetworkTechnology nt = NetworkTechnology.NEUTRON;
+ ProviderVlanNetwork pvn = new ProviderVlanNetwork(null, null);
+ pvn.setPhysicalNetworkName(null);
+ pvn.setVlans(null);
+ pvn.getPhysicalNetworkName();
+ pvn.getVlans();
- UpdateNetworkRequest unr = new UpdateNetworkRequest();
- unr.setBackout(null);
- unr.setCloudSiteId(null);
- unr.setContrailNetwork(null);
- unr.setMessageId(null);
- unr.setModelCustomizationUuid(null);
- unr.setMsoRequest(null);
- unr.setNetworkId(null);
- unr.setNetworkName(null);
- unr.setNetworkParams(null);
- unr.setNetworkStackId(null);
- unr.setNetworkTechnology("VMWARE");
- unr.setNetworkType(null);
- unr.setNetworkTypeVersion(null);
- unr.setNotificationUrl(null);
- unr.setProviderVlanNetwork(null);
- unr.setSkipAAI(null);
- unr.setSubnets(null);
- unr.setTenantId(null);
- unr.getBackout();
- unr.getCloudSiteId();
- unr.getContrailNetwork();
- unr.getMessageId();
- unr.getModelCustomizationUuid();
- unr.getMsoRequest();
- unr.getNetworkId();
- unr.getNetworkName();
- unr.getNetworkParams();
- unr.getNetworkStackId();
- unr.getNetworkTechnology();
- unr.getNetworkType();
- unr.getNetworkTypeVersion();
- unr.getNotificationUrl();
- unr.getProviderVlanNetwork();
- unr.getSkipAAI();
- unr.getSubnets();
- unr.getTenantId();
- unr.isContrailRequest();
+ QueryNetworkResponse qnr = new QueryNetworkResponse(null, null, null, null, null);
+ qnr.setNetworkExists(null);
+ qnr.setNetworkId(null);
+ qnr.setNetworkOutputs(null);
+ qnr.setNetworkStackId(null);
+ qnr.setNetworkStatus(null);
+ qnr.setNeutronNetworkId(null);
+ qnr.setRouteTargets(null);
+ qnr.setSubnetIdMap(null);
+ qnr.setVlans(null);
+ qnr.getNetworkExists();
+ qnr.getNetworkId();
+ qnr.getNetworkOutputs();
+ qnr.getNetworkStatus();
+ qnr.getNeutronNetworkId();
+ qnr.getRouteTargets();
+ qnr.getSubnetIdMap();
+ qnr.getVlans();
+ qnr.toJsonString();
- RollbackNetworkError err = new RollbackNetworkError("message");
- err = new RollbackNetworkError(null, null, false, null);
- RollbackNetworkRequest req = new RollbackNetworkRequest();
- req.setNetworkRollback(null);
- req.getNetworkRollback();
- req.setMessageId(null);
- req.getMessageId();
- req.setNotificationUrl(null);
- req.getNotificationUrl();
- req.setSkipAAI(null);
- req.getSkipAAI();
+ UpdateNetworkRequest unr = new UpdateNetworkRequest();
+ unr.setBackout(null);
+ unr.setCloudSiteId(null);
+ unr.setContrailNetwork(null);
+ unr.setMessageId(null);
+ unr.setModelCustomizationUuid(null);
+ unr.setMsoRequest(null);
+ unr.setNetworkId(null);
+ unr.setNetworkName(null);
+ unr.setNetworkParams(null);
+ unr.setNetworkStackId(null);
+ unr.setNetworkTechnology("VMWARE");
+ unr.setNetworkType(null);
+ unr.setNetworkTypeVersion(null);
+ unr.setNotificationUrl(null);
+ unr.setProviderVlanNetwork(null);
+ unr.setSkipAAI(null);
+ unr.setSubnets(null);
+ unr.setTenantId(null);
+ unr.getBackout();
+ unr.getCloudSiteId();
+ unr.getContrailNetwork();
+ unr.getMessageId();
+ unr.getModelCustomizationUuid();
+ unr.getMsoRequest();
+ unr.getNetworkId();
+ unr.getNetworkName();
+ unr.getNetworkParams();
+ unr.getNetworkStackId();
+ unr.getNetworkTechnology();
+ unr.getNetworkType();
+ unr.getNetworkTypeVersion();
+ unr.getNotificationUrl();
+ unr.getProviderVlanNetwork();
+ unr.getSkipAAI();
+ unr.getSubnets();
+ unr.getTenantId();
+ unr.isContrailRequest();
- RollbackNetworkResponse rnr = new RollbackNetworkResponse(true, null);
- rnr.setMessageId(null);
- rnr.getMessageId();
- rnr.setNetworkRolledBack(null);
- rnr.getNetworkRolledBack();
+ RollbackNetworkError err = new RollbackNetworkError("message");
+ err = new RollbackNetworkError(null, null, false, null);
+ RollbackNetworkRequest req = new RollbackNetworkRequest();
+ req.setNetworkRollback(null);
+ req.getNetworkRollback();
+ req.setMessageId(null);
+ req.getMessageId();
+ req.setNotificationUrl(null);
+ req.getNotificationUrl();
+ req.setSkipAAI(null);
+ req.getSkipAAI();
- UpdateNetworkError error = new UpdateNetworkError(null);
- error = new UpdateNetworkError("test", null, false, null);
+ RollbackNetworkResponse rnr = new RollbackNetworkResponse(true, null);
+ rnr.setMessageId(null);
+ rnr.getMessageId();
+ rnr.setNetworkRolledBack(null);
+ rnr.getNetworkRolledBack();
- UpdateVfModuleRequest uvmr = new UpdateVfModuleRequest();
- uvmr.setBackout(null);
- uvmr.setBaseVfModuleId(null);
- uvmr.setBaseVfModuleStackId(null);
- uvmr.setFailIfExists(null);
- uvmr.setMessageId(null);
- uvmr.setModelCustomizationUuid(null);
- uvmr.setMsoRequest(null);
- uvmr.setNotificationUrl(null);
- uvmr.setRequestType(null);
- uvmr.setSkipAAI(true);
- uvmr.setTenantId(null);
- uvmr.setVfModuleId(null);
- uvmr.setVfModuleName(null);
- uvmr.setVfModuleParams(null);
- uvmr.setVfModuleStackId(null);
- uvmr.setVfModuleType(null);
- uvmr.setVnfId(null);
- uvmr.setVnfType(null);
- uvmr.setVnfVersion(null);
- uvmr.setVolumeGroupId(null);
- uvmr.setVolumeGroupStackId(null);
- uvmr.getBackout();
- uvmr.getBaseVfModuleId();
- uvmr.getBaseVfModuleStackId();
- uvmr.getCloudSiteId();
- uvmr.getFailIfExists();
- uvmr.getMessageId();
- uvmr.getModelCustomizationUuid();
- uvmr.getMsoRequest();
- uvmr.getNotificationUrl();
- uvmr.getRequestType();
- uvmr.getSkipAAI();
- uvmr.getTenantId();
- uvmr.getVfModuleId();
- uvmr.getVfModuleName();
- uvmr.getVfModuleParams();
- uvmr.getVfModuleStackId();
- uvmr.getVfModuleType();
- uvmr.getVnfId();
- uvmr.getVnfType();
- uvmr.getVnfVersion();
- uvmr.getVolumeGroupId();
- uvmr.getVolumeGroupStackId();
- uvmr.setCloudSiteId(null);
+ UpdateNetworkError error = new UpdateNetworkError(null);
+ error = new UpdateNetworkError("test", null, false, null);
- CreateVfModuleRequest cvmr = new CreateVfModuleRequest();
- cvmr.setBackout(null);
- cvmr.setBaseVfModuleId(null);
- cvmr.setBaseVfModuleStackId(null);
- cvmr.setCloudSiteId(null);
- cvmr.setFailIfExists(null);
+ UpdateVfModuleRequest uvmr = new UpdateVfModuleRequest();
+ uvmr.setBackout(null);
+ uvmr.setBaseVfModuleId(null);
+ uvmr.setBaseVfModuleStackId(null);
+ uvmr.setFailIfExists(null);
+ uvmr.setMessageId(null);
+ uvmr.setModelCustomizationUuid(null);
+ uvmr.setMsoRequest(null);
+ uvmr.setNotificationUrl(null);
+ uvmr.setRequestType(null);
+ uvmr.setSkipAAI(true);
+ uvmr.setTenantId(null);
+ uvmr.setVfModuleId(null);
+ uvmr.setVfModuleName(null);
+ uvmr.setVfModuleParams(null);
+ uvmr.setVfModuleStackId(null);
+ uvmr.setVfModuleType(null);
+ uvmr.setVnfId(null);
+ uvmr.setVnfType(null);
+ uvmr.setVnfVersion(null);
+ uvmr.setVolumeGroupId(null);
+ uvmr.setVolumeGroupStackId(null);
+ uvmr.getBackout();
+ uvmr.getBaseVfModuleId();
+ uvmr.getBaseVfModuleStackId();
+ uvmr.getCloudSiteId();
+ uvmr.getFailIfExists();
+ uvmr.getMessageId();
+ uvmr.getModelCustomizationUuid();
+ uvmr.getMsoRequest();
+ uvmr.getNotificationUrl();
+ uvmr.getRequestType();
+ uvmr.getSkipAAI();
+ uvmr.getTenantId();
+ uvmr.getVfModuleId();
+ uvmr.getVfModuleName();
+ uvmr.getVfModuleParams();
+ uvmr.getVfModuleStackId();
+ uvmr.getVfModuleType();
+ uvmr.getVnfId();
+ uvmr.getVnfType();
+ uvmr.getVnfVersion();
+ uvmr.getVolumeGroupId();
+ uvmr.getVolumeGroupStackId();
+ uvmr.setCloudSiteId(null);
- coverCode(CreateVfModuleRequest.class);
- CreateVfModuleResponse resp = new CreateVfModuleResponse(null, null, null, true, null, null, null);
- resp.toJsonString();
- resp.toXmlString();
- coverCode(CreateVfModuleResponse.class);
+ CreateVfModuleRequest cvmr = new CreateVfModuleRequest();
+ cvmr.setBackout(null);
+ cvmr.setBaseVfModuleId(null);
+ cvmr.setBaseVfModuleStackId(null);
+ cvmr.setCloudSiteId(null);
+ cvmr.setFailIfExists(null);
- coverCode(CreateVolumeGroupRequest.class);
+ coverCode(CreateVfModuleRequest.class);
+ CreateVfModuleResponse resp = new CreateVfModuleResponse(null, null, null, true, null, null, null);
+ resp.toJsonString();
+ resp.toXmlString();
+ coverCode(CreateVfModuleResponse.class);
- CreateVolumeGroupResponse cvgr = new CreateVolumeGroupResponse(null, null, true, null, null, null);
- coverCode(CreateVolumeGroupResponse.class);
- coverCode(DeleteVfModuleRequest.class);
- coverCode(DeleteVfModuleResponse.class);
- coverCode(DeleteVolumeGroupRequest.class);
- coverCode(DeleteVolumeGroupResponse.class);
- QueryVfModuleResponse vfmr = new QueryVfModuleResponse(null, null, null, null, null);
- coverCode(QueryVfModuleResponse.class);
- QueryVolumeGroupResponse qvgr = new QueryVolumeGroupResponse(null, null, null, null);
- coverCode(QueryVolumeGroupResponse.class);
- UpdateVfModuleResponse uvfmr = new UpdateVfModuleResponse(null, null, null, null, null);
- coverCode(UpdateVfModuleResponse.class);
- coverCode(UpdateVolumeGroupRequest.class);
- UpdateVolumeGroupResponse uvgr = new UpdateVolumeGroupResponse(null, null, null, null);
- coverCode(UpdateVolumeGroupResponse.class);
- VfModuleExceptionResponse vfmer = new VfModuleExceptionResponse(null, null, false, null);
- coverCode(VfModuleExceptionResponse.class);
- //VfModuleRollback vfmrb = new VfModuleRollback(null, null, null, null);
- VfModuleRollback vfmrb = new VfModuleRollback(null, null, null, false, null, null, null, null);
- coverCode(VfModuleRollback.class);
- //VolumeGroupRollback vgrback = new VolumeGroupRollback(null, null, null);
- VolumeGroupRollback vgrback = new VolumeGroupRollback(null, null, false, null, null, null, null);
- coverCode(VolumeGroupRollback.class);
- RollbackVolumeGroupResponse rvgresp = new RollbackVolumeGroupResponse(null, null);
- coverCode(RollbackVolumeGroupResponse.class);
- }
+ coverCode(CreateVolumeGroupRequest.class);
- @Test
- public void testTenantRestPackage() {
- CreateTenantError cte = new CreateTenantError(null, null, false);
- coverCode(CreateTenantError.class);
- CreateTenantRequest ctreq = new CreateTenantRequest();
- ctreq.toJsonString();
- ctreq.toXmlString();
- ctreq.toString();
- coverCode(CreateTenantRequest.class);
- CreateTenantResponse ctresp = new CreateTenantResponse(null, null, null, new TenantRollback());
- ctresp.toString();
- coverCode(CreateTenantResponse.class);
- DeleteTenantError dterr = new DeleteTenantError(null, null, false);
- coverCode(DeleteTenantError.class);
- coverCode(DeleteTenantRequest.class);
- coverCode(DeleteTenantResponse.class);
- coverCode(HealthCheckHandler.class);
- QueryTenantError qnerr = new QueryTenantError(null, null);
- coverCode(QueryTenantError.class);
- QueryTenantResponse qtresp = new QueryTenantResponse(null, null, null);
- coverCode(QueryTenantResponse.class);
- coverCode(RollbackTenantError.class);
- RollbackTenantError rollTer = new RollbackTenantError(null, null, false);
- coverCode(RollbackTenantRequest.class);
- coverCode(RollbackTenantResponse.class);
- TenantExceptionResponse resp = new TenantExceptionResponse(null, null, false);
- coverCode(TenantExceptionResponse.class);
- coverCode(TenantRollback.class);
- }
+ CreateVolumeGroupResponse cvgr = new CreateVolumeGroupResponse(null, null, true, null, null, null);
+ coverCode(CreateVolumeGroupResponse.class);
+ coverCode(DeleteVfModuleRequest.class);
+ coverCode(DeleteVfModuleResponse.class);
+ coverCode(DeleteVolumeGroupRequest.class);
+ coverCode(DeleteVolumeGroupResponse.class);
+ QueryVfModuleResponse vfmr = new QueryVfModuleResponse(null, null, null, null, null);
+ coverCode(QueryVfModuleResponse.class);
+ QueryVolumeGroupResponse qvgr = new QueryVolumeGroupResponse(null, null, null, null);
+ coverCode(QueryVolumeGroupResponse.class);
+ UpdateVfModuleResponse uvfmr = new UpdateVfModuleResponse(null, null, null, null, null);
+ coverCode(UpdateVfModuleResponse.class);
+ coverCode(UpdateVolumeGroupRequest.class);
+ UpdateVolumeGroupResponse uvgr = new UpdateVolumeGroupResponse(null, null, null, null);
+ coverCode(UpdateVolumeGroupResponse.class);
+ VfModuleExceptionResponse vfmer = new VfModuleExceptionResponse(null, null, false, null);
+ coverCode(VfModuleExceptionResponse.class);
+ //VfModuleRollback vfmrb = new VfModuleRollback(null, null, null, null);
+ VfModuleRollback vfmrb = new VfModuleRollback(null, null, null, false, null, null, null, null);
+ coverCode(VfModuleRollback.class);
+ //VolumeGroupRollback vgrback = new VolumeGroupRollback(null, null, null);
+ VolumeGroupRollback vgrback = new VolumeGroupRollback(null, null, false, null, null, null, null);
+ coverCode(VolumeGroupRollback.class);
+ RollbackVolumeGroupResponse rvgresp = new RollbackVolumeGroupResponse(null, null);
+ coverCode(RollbackVolumeGroupResponse.class);
+ }
+
+ @Test
+ public void testTenantRestPackage(){
+ CreateTenantError cte = new CreateTenantError(null, null, false);
+ coverCode(CreateTenantError.class);
+ CreateTenantRequest ctreq = new CreateTenantRequest();
+ ctreq.toJsonString();
+ ctreq.toXmlString();
+ ctreq.toString();
+ coverCode(CreateTenantRequest.class);
+ CreateTenantResponse ctresp = new CreateTenantResponse(null, null, null, new TenantRollback());
+ ctresp.toString();
+ coverCode(CreateTenantResponse.class);
+ DeleteTenantError dterr = new DeleteTenantError(null, null, false);
+ coverCode(DeleteTenantError.class);
+ coverCode(DeleteTenantRequest.class);
+ coverCode(DeleteTenantResponse.class);
+ coverCode(HealthCheckHandler.class);
+ QueryTenantError qnerr = new QueryTenantError(null, null);
+ coverCode(QueryTenantError.class);
+ QueryTenantResponse qtresp = new QueryTenantResponse(null, null, null);
+ coverCode(QueryTenantResponse.class);
+ coverCode(RollbackTenantError.class);
+ RollbackTenantError rollTer = new RollbackTenantError(null, null, false);
+ coverCode(RollbackTenantRequest.class);
+ coverCode(RollbackTenantResponse.class);
+ TenantExceptionResponse resp = new TenantExceptionResponse(null, null, false);
+ coverCode(TenantExceptionResponse.class);
+ coverCode(TenantRollback.class);
+ }
- private void coverCode(Class cls) {
- try {
- Object obj = cls.newInstance();
- Method[] methods = cls.getDeclaredMethods();
- for (Method m : methods) {
- try {
- m.setAccessible(true);
- Type[] types = m.getGenericParameterTypes();
- Object[] objs = {new Object(), new Object(), new Object(), new Object()};
- if (types.length < 1) {
- m.invoke(obj);
- } else if (types.length == 1) {
- String type = types[0].getTypeName();
- if (type.contains("<")) {
- type = type.substring(0, type.indexOf("<"));
- }
- Class paramCls = Class.forName(type);
- Object paramobj = paramCls.newInstance();
- m.invoke(obj, paramobj);
- } else if (types.length == 2) {
- // m.invoke(obj,null,null);
- }
- } catch (Exception ex) {
- }
- }
- } catch (Exception ex) {
- ex.printStackTrace();
- }
- }
+ private void coverCode(Class cls) {
+ try {
+ Object obj = cls.newInstance();
+ Method[] methods = cls.getDeclaredMethods();
+ for (Method m : methods) {
+ try {
+ m.setAccessible(true);
+ Type[] types = m.getGenericParameterTypes();
+ Object[] objs = { new Object(), new Object(), new Object(), new Object() };
+ if (types.length < 1) {
+ m.invoke(obj);
+ } else if (types.length == 1) {
+ String type = types[0].getTypeName();
+ if (type.contains("<")) {
+ type = type.substring(0, type.indexOf("<"));
+ }
+ Class paramCls = Class.forName(type);
+ Object paramobj = paramCls.newInstance();
+ m.invoke(obj, paramobj);
+ } else if (types.length == 2) {
+ // m.invoke(obj,null,null);
+ }
+ } catch (Exception ex) {
+ }
+ }
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ }
+ }
}
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/json/MapDeserializerTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/json/MapDeserializerTest.java
index b3bf2b8c25..897c69d144 100644
--- a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/json/MapDeserializerTest.java
+++ b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/json/MapDeserializerTest.java
@@ -24,7 +24,6 @@ import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
import java.util.Map;
-
import org.codehaus.jackson.JsonParser;
import org.codehaus.jackson.map.DeserializationContext;
import org.codehaus.jackson.map.ObjectMapper;
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/json/MapSerializerTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/json/MapSerializerTest.java
index b97496d05b..f903f21441 100644
--- a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/json/MapSerializerTest.java
+++ b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/json/MapSerializerTest.java
@@ -25,7 +25,6 @@ import static org.mockito.Mockito.verify;
import java.util.HashMap;
import java.util.Map;
-
import org.codehaus.jackson.JsonGenerator;
import org.codehaus.jackson.map.SerializerProvider;
import org.junit.Test;