Search in sources :

Example 16 with ValidationMessages

use of org.sonar.api.utils.ValidationMessages in project sonarqube by SonarSource.

the class XMLProfileParserTest method nameAndLanguageShouldBeMandatory.

@Test
public void nameAndLanguageShouldBeMandatory() {
    ValidationMessages validation = ValidationMessages.create();
    parse("nameAndLanguageShouldBeMandatory.xml", validation);
    assertThat(validation.getErrors()).hasSize(2);
    assertThat(validation.getErrors().get(0)).contains("");
}
Also used : ValidationMessages(org.sonar.api.utils.ValidationMessages) Test(org.junit.Test)

Aggregations

ValidationMessages (org.sonar.api.utils.ValidationMessages)16 Test (org.junit.Test)8 RulesProfile (org.sonar.api.profiles.RulesProfile)7 ProfileDefinition (org.sonar.api.profiles.ProfileDefinition)3 ProfileImporter (org.sonar.api.profiles.ProfileImporter)3 Reader (java.io.Reader)2 Matchers.anyString (org.mockito.Matchers.anyString)2 InvocationOnMock (org.mockito.invocation.InvocationOnMock)2 ActiveRule (org.sonar.api.rules.ActiveRule)2 Rule (org.sonar.api.rules.Rule)2 RuleFinder (org.sonar.api.rules.RuleFinder)2 BuiltInQualityProfilesDefinition (org.sonar.api.server.profile.BuiltInQualityProfilesDefinition)2 HashSet (java.util.HashSet)1 Test (org.junit.jupiter.api.Test)1 RuleDebt (org.sonar.server.debt.DebtModelXMLExporter.RuleDebt)1