2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2019 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.openecomp.sdc.be.config;
23 import org.junit.Test;
24 import org.openecomp.sdc.be.config.ErrorInfo.ErrorInfoType;
27 public class ErrorInfoTest {
29 private ErrorInfo createTestSubject() {
30 return new ErrorInfo();
35 public void testGetCode() throws Exception {
36 ErrorInfo testSubject;
40 testSubject = createTestSubject();
41 result = testSubject.getCode();
46 public void testSetCode() throws Exception {
47 ErrorInfo testSubject;
51 testSubject = createTestSubject();
52 testSubject.setCode(code);
57 public void testGetMessage() throws Exception {
58 ErrorInfo testSubject;
62 testSubject = createTestSubject();
63 result = testSubject.getMessage();
68 public void testSetMessage() throws Exception {
69 ErrorInfo testSubject;
73 testSubject = createTestSubject();
74 testSubject.setMessage(message);
79 public void testGetMessageId() throws Exception {
80 ErrorInfo testSubject;
84 testSubject = createTestSubject();
85 result = testSubject.getMessageId();
90 public void testSetMessageId() throws Exception {
91 ErrorInfo testSubject;
92 String messageId = "";
95 testSubject = createTestSubject();
97 testSubject.setMessageId(messageId);
100 testSubject = createTestSubject();
102 testSubject.setMessageId(messageId);
107 public void testGetErrorInfoType() throws Exception {
108 ErrorInfo testSubject;
109 ErrorInfoType result;
112 testSubject = createTestSubject();
113 result = testSubject.getErrorInfoType();
120 public void testToString() throws Exception {
121 ErrorInfo testSubject;
125 testSubject = createTestSubject();
126 result = testSubject.toString();