aboutsummaryrefslogtreecommitdiffstats
path: root/aai-els-onap-logging/src/test/java/org/onap/aai/domain/restResponseInfo/InfoTest.java
blob: 6e1b0ea46f09c5b3cf2b06a573351898aa1d9a5c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/**
 * ============LICENSE_START=======================================================
 * org.onap.aai
 * ================================================================================
 * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
 * ================================================================================
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ============LICENSE_END=========================================================
 */
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2015.10.28 at 05:53:17 PM EDT
//

package org.onap.aai.domain.restResponseInfo;

import static org.junit.Assert.assertTrue;

import java.util.List;

import org.junit.Test;

public class InfoTest {
    private Info info = new Info();

    @Test
    public void infoTest() {
        Info.ResponseMessages responseMessages = info.getResponseMessages();
        if (responseMessages == null)
            responseMessages = new Info.ResponseMessages();

        List<Info.ResponseMessages.ResponseMessage> list = responseMessages.getResponseMessage();
        Info.ResponseMessages.ResponseMessage respMsg = new Info.ResponseMessages.ResponseMessage();

        respMsg.setMessageId("1");
        respMsg.setText("textValue");

        Info.ResponseMessages.ResponseMessage.Variables vars = new Info.ResponseMessages.ResponseMessage.Variables();
        vars.getVariable().add("var1");
        vars.getVariable().add("var2");

        respMsg.setVariables(vars);
        list.add(respMsg);
        info.setResponseMessages(responseMessages);

        Info.ResponseMessages responseMessages1 = info.getResponseMessages();
        List<Info.ResponseMessages.ResponseMessage> list1 = responseMessages1.getResponseMessage();
        Info.ResponseMessages.ResponseMessage respMsg1 = list1.get(0);
        assertTrue(respMsg1.getMessageId().equals("1"));
        assertTrue(respMsg1.getText().equals("textValue"));
        assertTrue(respMsg1.getVariables().getVariable().contains("var1"));
        assertTrue(respMsg1.getVariables().getVariable().contains("var2"));
    }

}