diff options
author | 2018-03-19 19:06:16 +0800 | |
---|---|---|
committer | 2018-03-19 19:06:16 +0800 | |
commit | 8ffa3474ef62373b4ac2657bf2be9b5a31629009 (patch) | |
tree | 94c82c6e5690cbdb1890bc4c847296e29fd4b364 /sdc-workflow-designer-server/src/test | |
parent | 43bed0e28512332aecc3b70f9e24840682c59e92 (diff) |
Entity Class for Activity Spec.
Definede entity class for activity specification extend.
Issue-ID: SDC-1129
Change-Id: I37d7c77f99002e8e4e1bd754a72d9c2f7b51aae6
Signed-off-by: YuanHu <yuan.hu1@zte.com.cn>
Diffstat (limited to 'sdc-workflow-designer-server/src/test')
-rw-r--r-- | sdc-workflow-designer-server/src/test/java/org/onap/sdc/workflowdesigner/resources/ExtendActivityResourceTest.java | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/sdc-workflow-designer-server/src/test/java/org/onap/sdc/workflowdesigner/resources/ExtendActivityResourceTest.java b/sdc-workflow-designer-server/src/test/java/org/onap/sdc/workflowdesigner/resources/ExtendActivityResourceTest.java new file mode 100644 index 00000000..8d3fd5d3 --- /dev/null +++ b/sdc-workflow-designer-server/src/test/java/org/onap/sdc/workflowdesigner/resources/ExtendActivityResourceTest.java @@ -0,0 +1,69 @@ +/**
+ * Copyright (c) 2018 ZTE Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the Apache License, Version 2.0
+ * and the Eclipse Public License v1.0 which both accompany this distribution,
+ * and are available at http://www.eclipse.org/legal/epl-v10.html
+ * and http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Contributors:
+ * ZTE - initial API and implementation and/or initial documentation
+ */
+package org.onap.sdc.workflowdesigner.resources;
+
+import static org.junit.Assert.assertEquals;
+
+import javax.ws.rs.core.Response;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.onap.sdc.workflowdesigner.resources.entity.ExtendActivity;
+import org.onap.sdc.workflowdesigner.utils.FileCommonUtils;
+
+import com.google.gson.Gson;
+
+/**
+ *
+ */
+public class ExtendActivityResourceTest {
+
+ /**
+ * @throws java.lang.Exception
+ */
+ @Before
+ public void setUp() throws Exception {}
+
+ /**
+ * @throws java.lang.Exception
+ */
+ @After
+ public void tearDown() throws Exception {}
+
+ /**
+ * Test method for {@link org.onap.sdc.workflowdesigner.resources.ExtendActivityResource#getExtActivities(java.lang.String)}.
+ */
+ @Test
+ public void testGetExtActivities() {
+ ExtendActivityResource resource = new ExtendActivityResource();
+ try {
+ Response response = resource.getExtActivities("test");
+ ExtendActivity[] extActivities = (ExtendActivity[]) response.getEntity();
+ Gson gson = new Gson();
+ FileCommonUtils.write("test.json", gson.toJson(extActivities));
+ assertEquals(extActivities.length == 0, false);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ }
+
+ /**
+ * Test method for {@link org.onap.sdc.workflowdesigner.resources.ExtendActivityResource#getDisplayInfo(java.lang.String)}.
+ */
+ @Test
+ public void testGetDisplayInfo() {
+
+ }
+
+}
|