Search in sources :

Example 1 with CodeLensOptions

use of com.github._1c_syntax.bsl.languageserver.configuration.codelens.CodeLensOptions in project bsl-language-server by 1c-syntax.

the class LanguageServerConfigurationTest method testPartialInitialization.

@Test
void testPartialInitialization() {
    // given
    File configurationFile = new File(PATH_TO_PARTIAL_CONFIGURATION_FILE);
    configuration.update(configurationFile);
    // when
    CodeLensOptions codeLensOptions = configuration.getCodeLensOptions();
    DiagnosticsOptions diagnosticsOptions = configuration.getDiagnosticsOptions();
    // then
    assertThat(codeLensOptions.isShowCognitiveComplexity()).isTrue();
    assertThat(codeLensOptions.isShowCyclomaticComplexity()).isFalse();
    assertThat(configuration.getLanguage()).isEqualTo(DEFAULT_LANGUAGE);
    assertThat(diagnosticsOptions.getMode()).isEqualTo(Mode.ON);
    assertThat(diagnosticsOptions.getSkipSupport()).isEqualTo(SkipSupport.NEVER);
    assertThat(diagnosticsOptions.getParameters()).isEmpty();
}
Also used : DiagnosticsOptions(com.github._1c_syntax.bsl.languageserver.configuration.diagnostics.DiagnosticsOptions) CodeLensOptions(com.github._1c_syntax.bsl.languageserver.configuration.codelens.CodeLensOptions) File(java.io.File) Test(org.junit.jupiter.api.Test) SpringBootTest(org.springframework.boot.test.context.SpringBootTest)

Aggregations

CodeLensOptions (com.github._1c_syntax.bsl.languageserver.configuration.codelens.CodeLensOptions)1 DiagnosticsOptions (com.github._1c_syntax.bsl.languageserver.configuration.diagnostics.DiagnosticsOptions)1 File (java.io.File)1 Test (org.junit.jupiter.api.Test)1 SpringBootTest (org.springframework.boot.test.context.SpringBootTest)1