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
13 package org.onap.sdc.workflowdesigner.model;
15 import static org.junit.Assert.assertEquals;
17 import java.util.ArrayList;
18 import java.util.List;
20 import org.junit.After;
21 import org.junit.Before;
22 import org.junit.Test;
23 import org.onap.sdc.workflowdesigner.model.Element.TYPE;
28 public class ElementTest {
31 * @throws java.lang.Exception
34 public void setUp() throws Exception {}
37 * @throws java.lang.Exception
40 public void tearDown() throws Exception {}
43 * Test method for {@link org.onap.sdc.workflowdesigner.model.Element#getType()}
47 public final void getType() {
48 Element endEvent = new EndEvent();
49 System.out.println(endEvent.getType());
50 assertEquals(endEvent.getType(), null);
58 TYPE type = TYPE.endEvent;
59 String documentation = "documentation";
60 Position position = new Position();
61 List<String> connections= new ArrayList<>();
63 Element e = new Element();
64 e.setConnections(connections);
65 e.setDocumentation(documentation);
68 e.setPosition(position);
71 assertEquals(connections, e.getConnections());
72 assertEquals(documentation, e.getDocumentation());
73 assertEquals(id, e.getId());
74 assertEquals(name, e.getName());
75 assertEquals(position, e.getPosition());
76 assertEquals(type, e.getType());