diff options
author | Rob Daugherty <rd472p@att.com> | 2018-10-31 10:21:22 -0400 |
---|---|---|
committer | Rob Daugherty <rd472p@att.com> | 2018-10-31 10:38:00 -0400 |
commit | 6b4910cc194286bccb2a63f63d12bfefcdb7fb3f (patch) | |
tree | f140576b3c42c0b575bfe5ab0cf11bffc23f708e /common/src/test/java/org/onap | |
parent | 9390b58f5e502bfdf5d0127a4cc5b45e12f17cb6 (diff) | |
parent | a233b62a56517e06ce63b8d801bcdebd6df18af5 (diff) |
10/31: merge casablanca to master
Commit: 649c4e85cc991ffe9c13fd3fab4cc3a303faa656
Subject: Fix Error, Check that vimID is present
Issue: SO-1156
https://gerrit.onap.org/r/#/c/71247/
Commit: 959493d3274d2f2749586248cf31ee12b730e2af
Subject: Bug fixes October 26th
Issue: SO-1169
https://gerrit.onap.org/r/#/c/71343/
Commit: 373c057bfa82583f615ea46814ad3cdf9ea8d669
Subject: Resolve vf_module_id setting bug
Issue: SO-1165
https://gerrit.onap.org/r/#/c/71270/
Commit: 6c2c8a66fade016f74b51bdfea3ba04494530b97
Issue: SO-1102
Subject: Pnf Spring Environment correction
https://gerrit.onap.org/r/#/c/71137/
Change-Id: I22b4566050f627e1f1428aacdb52ec4d4fe75733
Issue-ID: SO-1173
Signed-off-by: Rob Daugherty <rd472p@att.com>
Diffstat (limited to 'common/src/test/java/org/onap')
-rw-r--r-- | common/src/test/java/org/onap/so/client/aai/entities/uri/AAISimpleUriTest.java | 38 | ||||
-rw-r--r-- | common/src/test/java/org/onap/so/constants/DefaultsTest.java | 2 |
2 files changed, 38 insertions, 2 deletions
diff --git a/common/src/test/java/org/onap/so/client/aai/entities/uri/AAISimpleUriTest.java b/common/src/test/java/org/onap/so/client/aai/entities/uri/AAISimpleUriTest.java index fcf054f489..2a0e9df9ed 100644 --- a/common/src/test/java/org/onap/so/client/aai/entities/uri/AAISimpleUriTest.java +++ b/common/src/test/java/org/onap/so/client/aai/entities/uri/AAISimpleUriTest.java @@ -21,15 +21,24 @@ package org.onap.so.client.aai.entities.uri; import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.collection.IsIterableContainingInOrder.contains; import static org.hamcrest.collection.IsEmptyCollection.empty; +import static org.hamcrest.collection.IsIterableContainingInOrder.contains; import static org.junit.Assert.assertEquals; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; import java.util.Map; import org.junit.Test; import org.onap.so.client.aai.AAIObjectPlurals; import org.onap.so.client.aai.AAIObjectType; +import org.onap.so.client.graphinventory.entities.uri.Depth; +import org.onap.so.client.graphinventory.entities.uri.SimpleUri; public class AAISimpleUriTest { @@ -83,4 +92,31 @@ public class AAISimpleUriTest { assertEquals("my value", keys.get("service-type")); } + + @Test + public void serializeTest() throws IOException, ClassNotFoundException { + AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, "test1"); + + uri.depth(Depth.ONE); + uri.limit(1); + ByteArrayOutputStream bos = new ByteArrayOutputStream(); + + ObjectOutputStream objectOutputStream + = new ObjectOutputStream(bos); + objectOutputStream.writeObject(uri); + objectOutputStream.flush(); + objectOutputStream.close(); + + ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray()); + + ObjectInputStream objectInputStream + = new ObjectInputStream(bis); + AAIResourceUri e2 = (AAIResourceUri) objectInputStream.readObject(); + objectInputStream.close(); + + uri.queryParam("test", "value"); + e2.queryParam("test", "value"); + + assertEquals(e2.build().toString(), uri.build().toString()); + } } diff --git a/common/src/test/java/org/onap/so/constants/DefaultsTest.java b/common/src/test/java/org/onap/so/constants/DefaultsTest.java index 1bcee07118..6383d0ea4c 100644 --- a/common/src/test/java/org/onap/so/constants/DefaultsTest.java +++ b/common/src/test/java/org/onap/so/constants/DefaultsTest.java @@ -41,6 +41,6 @@ public class DefaultsTest { @Test public void checkValue() { - assertEquals("CloudOwner", Defaults.CLOUD_OWNER.toString()); + assertEquals("my-custom-owner", Defaults.CLOUD_OWNER.toString()); } } |