2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.onap.aai.schemagen.genxsd;
23 import static org.hamcrest.CoreMatchers.is;
24 import static org.hamcrest.MatcherAssert.assertThat;
26 import java.util.Arrays;
27 import java.util.Collection;
29 import org.junit.Before;
30 import org.junit.Test;
31 import org.junit.runner.RunWith;
32 import org.junit.runners.Parameterized;
33 import org.junit.runners.Parameterized.Parameters;
35 @RunWith(Parameterized.class)
36 public class DeleteFootnoteSetTest {
40 DeleteFootnoteSet footnotes = null;
43 public static Collection<String[]> testConditions() {
46 "\n -(1) IF this VSERVER node is deleted, this FROM node is DELETED also\n"},
48 "\n -(2) IF this CTAG-POOL node is deleted, this TO node is DELETED also\n"},
50 "\n -(3) IF this FROM node is deleted, this PSERVER is DELETED also\n"},
51 {"oam-network", "(4)",
52 "\n -(4) IF this TO node is deleted, this OAM-NETWORK is DELETED also\n"},
54 "\n -(1) IF this DVS-SWITCH node is deleted, this FROM node is DELETED also\n"},
55 {"availability-zone", "(3)",
56 "\n -(3) IF this FROM node is deleted, this AVAILABILITY-ZONE is DELETED also\n"}};
57 return (Arrays.asList(inputs));
60 public DeleteFootnoteSetTest(String targetNode, String flavor, String result) {
62 this.targetNode = targetNode;
68 public void setUp() throws Exception {
69 footnotes = new DeleteFootnoteSet(this.targetNode);
73 public void testDeleteFootnoteSet() {
74 assertThat(footnotes.targetNode, is(this.targetNode));
78 public void testAdd() {
79 footnotes.add(this.flavor);
80 assertThat(footnotes.footnotes.size(), is(1));
84 public void testToString() {
85 footnotes.add(this.flavor);
86 assertThat(footnotes.toString(), is(this.result));