d073d5050b61fdc82a5a6009d7d11e4adf5a61f3
[sdc.git] /
1 package org.openecomp.sdc.validation.impl.validators;
2
3 import org.openecomp.core.validation.types.MessageContainer;
4 import org.openecomp.sdc.validation.Validator;
5 import org.openecomp.sdc.validation.util.ValidationTestUtil;
6 import org.testng.Assert;
7 import org.testng.annotations.Test;
8
9 import java.util.Map;
10
11 public class HeatResourceValidatorTest {
12
13   Validator validator=new HeatResourceValidator();
14
15   @Test
16   public void testParseException(){
17     Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(validator,
18         "/org/openecomp/validation/validators/guideLineValidator/baseHeatDoesNotExposeNetwork/parseException/");
19     Assert.assertEquals(messages.size(), 1);
20     Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(),
21         "ERROR: [RBV2]: Invalid HEAT format problem - [while scanning for the next token\n" +
22             "found character '\\t(TAB)' that cannot start any token. (Do not use \\t(TAB) for indentation)\n" +
23             " in 'reader', line 5, column 1:\n" +
24             "    \t\t\tresources:\n" +
25             "    ^\n" +
26             "]");
27   }
28 }