2 * Copyright (c) 2018 ZTE Corporation.
\r
3 * All rights reserved. This program and the accompanying materials
\r
4 * are made available under the Apache License, Version 2.0
\r
5 * and the Eclipse Public License v1.0 which both accompany this distribution,
\r
6 * and are available at http://www.eclipse.org/legal/epl-v10.html
\r
7 * and http://www.apache.org/licenses/LICENSE-2.0
\r
10 * ZTE - initial API and implementation and/or initial documentation
\r
12 package org.onap.sdc.workflowdesigner.resources;
\r
14 import static org.junit.Assert.assertEquals;
\r
16 import javax.ws.rs.core.Response;
\r
18 import org.junit.After;
\r
19 import org.junit.Before;
\r
20 import org.junit.Test;
\r
21 import org.onap.sdc.workflowdesigner.resources.entity.ExtendActivity;
\r
22 import org.onap.sdc.workflowdesigner.utils.FileCommonUtils;
\r
23 import org.onap.sdc.workflowdesigner.utils.JsonUtils;
\r
28 public class ExtendActivityResourceTest {
\r
31 * @throws java.lang.Exception
\r
34 public void setUp() throws Exception {}
\r
37 * @throws java.lang.Exception
\r
40 public void tearDown() throws Exception {}
\r
43 * Test method for {@link org.onap.sdc.workflowdesigner.resources.ExtendActivityResource#getExtActivities(java.lang.String)}.
\r
46 public void testGetExtActivities() {
\r
47 ExtendActivityResource resource = new ExtendActivityResource();
\r
49 Response response = resource.getExtActivities("test");
\r
50 ExtendActivity[] extActivities = (ExtendActivity[]) response.getEntity();
\r
51 FileCommonUtils.write("test.json", JsonUtils.toJson(extActivities));
\r
52 assertEquals(extActivities.length == 0, false);
\r
53 } catch (Exception e) {
\r
54 e.printStackTrace();
\r
60 * Test method for {@link org.onap.sdc.workflowdesigner.resources.ExtendActivityResource#getDisplayInfo(java.lang.String)}.
\r
63 public void testGetDisplayInfo() {
\r