2 * Copyright (c) 2018 ZTE Corporation.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the Apache License, Version 2.0
5 * and the Eclipse Public License v1.0 which both accompany this distribution,
6 * and are available at http://www.eclipse.org/legal/epl-v10.html
7 * and http://www.apache.org/licenses/LICENSE-2.0
10 * ZTE - initial API and implementation and/or initial documentation
12 package org.onap.sdc.workflowdesigner.resources;
14 import static org.junit.Assert.assertEquals;
16 import org.junit.After;
17 import org.junit.Before;
18 import org.junit.Test;
19 import org.onap.sdc.workflowdesigner.resources.entity.ExtActivity;
20 import org.onap.sdc.workflowdesigner.utils.FileCommonUtils;
21 import org.onap.sdc.workflowdesigner.utils.JsonUtils;
26 public class ExtendActivityResourceTest {
27 private static final String EXT_ACTIVITIES_FILE_NAME = "src/main/assembly/ext-activities.json";
30 * @throws java.lang.Exception
33 public void setUp() throws Exception {}
36 * @throws java.lang.Exception
39 public void tearDown() throws Exception {}
45 public void testRetriveExtActivites() {
47 String json = FileCommonUtils.readString(EXT_ACTIVITIES_FILE_NAME);
48 ExtActivity[] extActivities = JsonUtils.fromJson(json, ExtActivity[].class);
50 FileCommonUtils.write("test.json", JsonUtils.toJson(extActivities));
51 assertEquals(extActivities.length == 0, false);
52 } catch (Exception e) {
59 * Test method for {@link org.onap.sdc.workflowdesigner.resources.ExtendActivityResource#getDisplayInfo(java.lang.String)}.
62 public void testGetDisplayInfo() {