* ============LICENSE_END=========================================================\r
*/\r
\r
-package org.openecomp.sdnc.config.params.transformer.tosca;\r
-\r
-import org.junit.Assert;\r
-import org.junit.Test;\r
-import org.openecomp.sdnc.config.params.data.RequestKey;\r
-import org.openecomp.sdnc.config.params.data.ResponseKey;\r
+package org.onap.sdnc.config.params.transformer.tosca;\r
\r
import java.util.ArrayList;\r
import java.util.List;\r
+import org.junit.Assert;\r
+import org.junit.Test;\r
+import org.onap.sdnc.config.params.data.RequestKey;\r
+import org.onap.sdnc.config.params.data.ResponseKey;\r
\r
-public class TestPropertyQueryString\r
-{\r
- @Test\r
- public void testBuildResponseKeys()\r
- {\r
+public class TestPropertyQueryString {\r
+ @Test\r
+ public void testBuildResponseKeys() {\r
ArtifactProcessorImpl arp = new ArtifactProcessorImpl();\r
- String properties= arp.buildResponseKeyExpression(createResponseKeys());\r
- Assert.assertEquals("<response-keys = address-fqdn:0000000000000:ipaddress-v4 , key2:value2:field2>",properties);\r
+ String properties = arp.buildResponseKeyExpression(createResponseKeys());\r
+ Assert.assertEquals(\r
+ "<response-keys = address-fqdn:0000000000000:ipaddress-v4 , key2:value2:field2>",\r
+ properties);\r
}\r
\r
- @Test\r
- public void testBuildRequestKeys()\r
- {\r
+ @Test\r
+ public void testBuildRequestKeys() {\r
ArtifactProcessorImpl arp = new ArtifactProcessorImpl();\r
- String properties= arp.buildRequestKeyExpression(createRequestKeys());\r
- Assert.assertEquals("<request-keys = class-type:interface-ip-address , address_fqdn:00000000000000 , address_type:v4>",properties);\r
+ String properties = arp.buildRequestKeyExpression(createRequestKeys());\r
+ Assert.assertEquals(\r
+ "<request-keys = class-type:interface-ip-address , address_fqdn:00000000000000 , address_type:v4>",\r
+ properties);\r
}\r
\r
@Test\r
- public void testEncoding()\r
- {\r
+ public void testEncoding() {\r
ArtifactProcessorImpl arp = new ArtifactProcessorImpl();\r
\r
String expected1 = "<class-type>";\r
String encoded1 = arp.encode("<class-type>");\r
- Assert.assertEquals(expected1,encoded1);\r
+ Assert.assertEquals(expected1, encoded1);\r
\r
String expected2 = "<<<metallica<>iron_maiden>>>";\r
String encoded2 = arp.encode("<<<metallica<>iron_maiden>>>");\r
- Assert.assertEquals(expected2,encoded2);\r
+ Assert.assertEquals(expected2, encoded2);\r
\r
String expected3 = "band-list:metallica,ironmaiden";\r
String encoded3 = arp.encode("band-list:metallica,ironmaiden");\r
- Assert.assertEquals(expected3,encoded3);\r
+ Assert.assertEquals(expected3, encoded3);\r
\r
String expected4 = "motorhead=lemmy";\r
String encoded4 = arp.encode("motorhead=lemmy");\r
- Assert.assertEquals(expected4,encoded4);\r
+ Assert.assertEquals(expected4, encoded4);\r
\r
String expected5 = "DreamTheater";\r
String encoded5 = arp.encode(" DreamTheater ");\r
- Assert.assertEquals(expected5,encoded5);\r
+ Assert.assertEquals(expected5, encoded5);\r
}\r
\r
@Test\r
- public void testBuildRuleType()\r
- {\r
+ public void testBuildRuleType() {\r
ArtifactProcessorImpl arp = new ArtifactProcessorImpl();\r
String input = "IPV4";\r
String expected = "<rule-type = IPV4>";\r
- Assert.assertEquals(expected,arp.buildRuleType(input));\r
+ Assert.assertEquals(expected, arp.buildRuleType(input));\r
}\r
\r
@Test\r
- public void testRuleTypeSetNull()\r
- {\r
+ public void testRuleTypeSetNull() {\r
ArtifactProcessorImpl arp = new ArtifactProcessorImpl();\r
String expected = "<rule-type = >";\r
- Assert.assertEquals(expected,arp.buildRuleType(null));\r
+ Assert.assertEquals(expected, arp.buildRuleType(null));\r
}\r
\r
@Test\r
- public void testBuildRequestKeysWithKeyNull()\r
- {\r
+ public void testBuildRequestKeysWithKeyNull() {\r
ArtifactProcessorImpl arp = new ArtifactProcessorImpl();\r
List<RequestKey> requestKeyList = new ArrayList<RequestKey>();\r
requestKeyList.add(null);\r
- String properties= arp.buildRequestKeyExpression(requestKeyList);\r
- Assert.assertEquals("<request-keys = >",properties);\r
+ String properties = arp.buildRequestKeyExpression(requestKeyList);\r
+ Assert.assertEquals("<request-keys = >", properties);\r
}\r
\r
@Test\r
- public void testBuildResponseKeysWithKeyNull()\r
- {\r
+ public void testBuildResponseKeysWithKeyNull() {\r
ArtifactProcessorImpl arp = new ArtifactProcessorImpl();\r
List<ResponseKey> responseKeyList = new ArrayList<ResponseKey>();\r
responseKeyList.add(null);\r
- String properties= arp.buildResponseKeyExpression(responseKeyList);\r
- Assert.assertEquals("<response-keys = >",properties);\r
+ String properties = arp.buildResponseKeyExpression(responseKeyList);\r
+ Assert.assertEquals("<response-keys = >", properties);\r
}\r
\r
@Test\r
- public void testBuildSourceSystem()\r
- {\r
+ public void testBuildSourceSystem() {\r
ArtifactProcessorImpl arp = new ArtifactProcessorImpl();\r
- Assert.assertEquals("<source-system = source>",arp.buildSourceSystem("source"));\r
+ Assert.assertEquals("<source-system = source>", arp.buildSourceSystem("source"));\r
}\r
- \r
- //@Test\r
- private List<RequestKey> createRequestKeys()\r
- {\r
- //Create RequestKey object 1\r
+\r
+ // @Test\r
+ private List<RequestKey> createRequestKeys() {\r
+ // Create RequestKey object 1\r
RequestKey requestKey1 = new RequestKey();\r
requestKey1.setKeyName("class-type");\r
requestKey1.setKeyValue("interface-ip-address");\r
\r
- //Create RequestKey object 2\r
+ // Create RequestKey object 2\r
RequestKey requestKey2 = new RequestKey();\r
requestKey2.setKeyName("address_fqdn");\r
requestKey2.setKeyValue("00000000000000");\r
\r
- //Create RequestKey object 3\r
+ // Create RequestKey object 3\r
RequestKey requestKey3 = new RequestKey();\r
requestKey3.setKeyName("address_type");\r
requestKey3.setKeyValue("v4");\r
\r
- //Add the RequestKey Objects to the List\r
+ // Add the RequestKey Objects to the List\r
List<RequestKey> requestKeyList = new ArrayList<RequestKey>();\r
requestKeyList.add(requestKey1);\r
requestKeyList.add(requestKey2);\r
requestKeyList.add(requestKey3);\r
- return requestKeyList;\r
+ return requestKeyList;\r
}\r
- \r
- //@Test\r
- private List<ResponseKey> createResponseKeys()\r
- {\r
- //Create RequestKey object 1\r
+\r
+ // @Test\r
+ private List<ResponseKey> createResponseKeys() {\r
+ // Create RequestKey object 1\r
ResponseKey responseKey1 = new ResponseKey();\r
\r
responseKey1.setUniqueKeyName("address-fqdn");\r
responseKey2.setUniqueKeyValue("value2");\r
responseKey2.setFieldKeyName("field2");\r
\r
- //Add the RequestKey Objects to the List\r
+ // Add the RequestKey Objects to the List\r
List<ResponseKey> responseKeyList = new ArrayList<ResponseKey>();\r
responseKeyList.add(responseKey1);\r
responseKeyList.add(responseKey2);\r
\r
- return responseKeyList;\r
+ return responseKeyList;\r
}\r
}\r