2 * Copyright © 2016-2018 European Support Limited
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.sdc.validation.impl.validators;
20 import org.junit.Assert;
21 import org.junit.Test;
22 import org.openecomp.core.validation.types.MessageContainer;
23 import org.openecomp.sdc.validation.Validator;
24 import org.openecomp.sdc.validation.util.ValidationTestUtil;
26 public class HeatResourceValidatorTest {
28 Validator validator=new HeatResourceValidator();
31 public void testParseException(){
32 Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(validator,
33 "/org/openecomp/validation/validators/guideLineValidator/baseHeatDoesNotExposeNetwork/parseException/");
34 Assert.assertEquals(messages.size(), 1);
35 Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(),
36 "ERROR: [RBV2]: Invalid HEAT format problem - [while scanning for the next token\n" +
37 "found character '\\t(TAB)' that cannot start any token. (Do not use \\t(TAB) for indentation)\n" +
38 " in 'reader', line 5, column 1:\n" +
39 " \t\t\tresources:\n" +