org.sonar.api.Properties Java Examples
The following examples show how to use
org.sonar.api.Properties.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TypeScriptPluginTest.java From SonarTsPlugin with MIT License | 5 votes |
@Test public void decoratedWithPropertiesAnnotation() { Annotation[] annotations = plugin.getClass().getAnnotations(); assertEquals(1, annotations.length); assertEquals(Properties.class, annotations[0].annotationType()); }
Example #2
Source File: TypeScriptPluginTest.java From SonarTsPlugin with MIT License | 5 votes |
@Test public void definesExpectedProperties() { Annotation annotation = plugin.getClass().getAnnotations()[0]; Properties propertiesAnnotation = (Properties) annotation; assertEquals(13, propertiesAnnotation.value().length); Property[] properties = propertiesAnnotation.value(); assertNotNull(findPropertyByName(properties, TypeScriptPlugin.SETTING_EXCLUDE_TYPE_DEFINITION_FILES)); assertNotNull(findPropertyByName(properties, TypeScriptPlugin.SETTING_FORCE_ZERO_COVERAGE)); assertNotNull(findPropertyByName(properties, TypeScriptPlugin.SETTING_LCOV_REPORT_PATH)); assertNotNull(findPropertyByName(properties, TypeScriptPlugin.SETTING_TS_LINT_ENABLED)); assertNotNull(findPropertyByName(properties, TypeScriptPlugin.SETTING_TS_LINT_PATH)); assertNotNull(findPropertyByName(properties, TypeScriptPlugin.SETTING_TS_LINT_CONFIG_PATH)); assertNotNull(findPropertyByName(properties, TypeScriptPlugin.SETTING_TS_LINT_TIMEOUT)); assertNotNull(findPropertyByName(properties, TypeScriptPlugin.SETTING_TS_LINT_RULES_DIR)); assertNotNull(findPropertyByName(properties, TypeScriptPlugin.SETTING_TS_RULE_CONFIGS)); assertNotNull(findPropertyByName(properties, TypeScriptPlugin.SETTING_TS_LINT_TYPECHECK)); assertNotNull(findPropertyByName(properties, TypeScriptPlugin.SETTING_TS_LINT_PROJECT_PATH)); assertNotNull(findPropertyByName(properties, TypeScriptPlugin.SETTING_TS_LINT_OUTPUT_PATH)); assertNotNull(findPropertyByName(properties, TypeScriptPlugin.SETTING_TS_LINT_DISALLOW_CUSTOM_RULES)); }
Example #3
Source File: TypeScriptPluginTest.java From SonarTsPlugin with MIT License | 4 votes |
private Property findPropertyByName(String property) { return findPropertyByName(((Properties) plugin.getClass() .getAnnotations()[0]).value(), property); }