Search in sources :

Example 1 with Context

use of org.sonar.api.server.profile.BuiltInQualityProfilesDefinition.Context in project sonar-web by SonarSource.

the class SonarWayProfileTest method test.

@Test
public void test() {
    SonarWayProfile definition = new SonarWayProfile();
    Context context = new Context();
    definition.define(context);
    BuiltInQualityProfile profile = context.profile("web", "Sonar way");
    Assertions.assertThat(profile.name()).isEqualTo("Sonar way");
    Assertions.assertThat(profile.language()).isEqualTo(HtmlConstants.LANGUAGE_KEY);
    Assertions.assertThat(profile.rules().size()).isGreaterThan(10);
}
Also used : Context(org.sonar.api.server.profile.BuiltInQualityProfilesDefinition.Context) BuiltInQualityProfile(org.sonar.api.server.profile.BuiltInQualityProfilesDefinition.BuiltInQualityProfile) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 BuiltInQualityProfile (org.sonar.api.server.profile.BuiltInQualityProfilesDefinition.BuiltInQualityProfile)1 Context (org.sonar.api.server.profile.BuiltInQualityProfilesDefinition.Context)1