2 * Copyright © 2019 iconectiv
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package org.openecomp.core.externaltesting.api;
19 import com.fasterxml.jackson.annotation.JsonInclude;
21 import lombok.EqualsAndHashCode;
23 import java.util.ArrayList;
24 import java.util.List;
27 * Tree structure of tests. VTP does not provide an organized
28 * tree of tests. Here we define a tree node with tests and
29 * child nodes to represent our tree.
31 @SuppressWarnings("unused")
32 @JsonInclude(JsonInclude.Include.NON_EMPTY)
34 @EqualsAndHashCode(callSuper=true)
35 public class TestTreeNode extends VtpNameDescriptionPair {
37 @JsonInclude(JsonInclude.Include.NON_EMPTY)
38 private List<VtpTestCase> tests;
40 @JsonInclude(JsonInclude.Include.NON_EMPTY)
41 private List<TestTreeNode> children;
43 public TestTreeNode() {
47 public TestTreeNode(String name, String description) {
48 super(name, description);
51 public void addTest(VtpTestCase test) {
53 tests = new ArrayList<>();
58 public void addChild(TestTreeNode child) {
59 if (children == null) {
60 children = new ArrayList<>();