diff options
author | 2016-10-21 15:57:05 +0800 | |
---|---|---|
committer | 2016-10-21 15:57:05 +0800 | |
commit | 0f1d00623cf43a9c0401a49c2ee86370c860680b (patch) | |
tree | 7ec38ba85ec47a826b0e5b12955118fa0a123690 /catalog-core/catalog-mgr/src/test | |
parent | 203cfc217785597c768652dc6be40da145d07ea7 (diff) |
Fix bugs TOSCA-123 GSO-33
Change-Id: Iabd06b1adc2399befd05e1411321c9beb417a94c
Issue-id:TOSCA-123 GSO-33
Signed-off-by: nancylizi <li.zi30@zte.com.cn>
Diffstat (limited to 'catalog-core/catalog-mgr/src/test')
2 files changed, 12 insertions, 6 deletions
diff --git a/catalog-core/catalog-mgr/src/test/java/org/openo/commontosca/catalog/wrapper/PackageWrapperTest.java b/catalog-core/catalog-mgr/src/test/java/org/openo/commontosca/catalog/wrapper/PackageWrapperTest.java index 9cfa46c3..93c7dc44 100644 --- a/catalog-core/catalog-mgr/src/test/java/org/openo/commontosca/catalog/wrapper/PackageWrapperTest.java +++ b/catalog-core/catalog-mgr/src/test/java/org/openo/commontosca/catalog/wrapper/PackageWrapperTest.java @@ -157,8 +157,8 @@ public class PackageWrapperTest { @Test public void testQueryPackageById() throws Exception { - ArrayList<PackageMeta> metas = new ArrayList<PackageMeta>(); - metas = getPackageMetaList(); + PackageMeta metas = new PackageMeta(); + metas = getPackageMeta(); Response result = PackageWrapper.getInstance().queryPackageById("123456"); assertEquals(200, result.getStatus()); @@ -267,6 +267,14 @@ public class PackageWrapperTest { private ArrayList<PackageMeta> getPackageMetaList() { PackageMeta meta = new PackageMeta(); + meta = getPackageMeta(); + ArrayList<PackageMeta> metas = new ArrayList<PackageMeta>(); + metas.add(meta); + return metas; + } + + private PackageMeta getPackageMeta() { + PackageMeta meta = new PackageMeta(); meta.setCreateTime("2016-06-29 03:33:15"); meta.setCsarId("123456"); meta.setDeletionPending(false); @@ -283,9 +291,7 @@ public class PackageWrapperTest { meta.setVersion("V1.0"); meta.setOnBoardState(EnumOnboardState.nonOnBoarded.getValue()); meta.setProcessState(EnumProcessState.valueOf("normal")); - ArrayList<PackageMeta> metas = new ArrayList<PackageMeta>(); - metas.add(meta); - return metas; + return meta; } private String getDownloadUriHead() { diff --git a/catalog-core/catalog-mgr/src/test/java/org/openo/commontosca/catalog/wrapper/ServiceTemplateWrapperTest.java b/catalog-core/catalog-mgr/src/test/java/org/openo/commontosca/catalog/wrapper/ServiceTemplateWrapperTest.java index 1cbf2ad3..175c1d80 100644 --- a/catalog-core/catalog-mgr/src/test/java/org/openo/commontosca/catalog/wrapper/ServiceTemplateWrapperTest.java +++ b/catalog-core/catalog-mgr/src/test/java/org/openo/commontosca/catalog/wrapper/ServiceTemplateWrapperTest.java @@ -359,7 +359,7 @@ public class ServiceTemplateWrapperTest { private ServiceTemplate getExpectServiceTemplate() { ServiceTemplate serviceTemplate = new ServiceTemplate(); - serviceTemplate.setCsarid("123456"); + serviceTemplate.setCsarId("123456"); serviceTemplate.setDownloadUri(MsbAddrConfig.getMsbAddress() + "/files/catalog-http/NSAR/ZTE/NanocellGW/v1.0/NanocellGW/Definitions/segw.yml"); InputParameter[] inputs = getServiceTemplateInputs(); |