1 package org.openecomp.sdc.validation.base;
3 import org.openecomp.core.validation.types.MessageContainer;
4 import org.openecomp.sdc.validation.util.ValidationTestUtil;
5 import org.testng.Assert;
6 import org.testng.annotations.Test;
11 public class ResourceBaseValidatorTest {
13 ResourceBaseValidator resourceBaseValidator=new ResourceBaseValidator();
16 public void testInvalidResourceType(){
17 Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(
18 resourceBaseValidator, "/InvalidResourceType");
19 Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(),
20 "WARNING: [RBV1]: A resource has an invalid or unsupported type - null, " +
21 "Resource ID [FSB2]");
25 public void testInvalidHeatStructure(){
26 Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(resourceBaseValidator,
27 "/InvalidHeatStructure");
28 Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(),
29 "ERROR: [RBV2]: Invalid HEAT format problem - [while scanning for the next " +
30 "token\n" + "found character '\\t(TAB)' that cannot start any token. " +
31 "(Do not use \\t(TAB) for indentation)\n" +
32 " in 'reader', line 10, column 1:\n" +
33 " \t\t\tresources:\n" +