Skip to content

Commit

Permalink
Fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
BoykoAlex committed Jun 14, 2024
1 parent 56a4e4b commit 82761e7
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,16 @@
import org.springframework.ide.vscode.boot.bootiful.BootLanguageServerTest;
import org.springframework.ide.vscode.boot.bootiful.SymbolProviderTestConf;
import org.springframework.ide.vscode.commons.languageserver.java.JavaProjectFinder;
import org.springframework.ide.vscode.commons.languageserver.util.Settings;
import org.springframework.ide.vscode.commons.util.text.LanguageId;
import org.springframework.ide.vscode.languageserver.testharness.Editor;
import org.springframework.ide.vscode.project.harness.BootLanguageServerHarness;
import org.springframework.ide.vscode.project.harness.ProjectsHarness;
import org.springframework.test.context.junit.jupiter.SpringExtension;

import com.google.gson.Gson;
import com.google.gson.JsonElement;

@ExtendWith(SpringExtension.class)
@BootLanguageServerTest
@Import(SymbolProviderTestConf.class)
Expand All @@ -49,6 +53,22 @@ public void setup() throws Exception {

// trigger project creation
projectFinder.find(new TextDocumentIdentifier(projectDir)).get();

String changedSettings = """
{
"spring-boot": {
"ls": {
"problem": {
"data-query": {
"SQL_SYNTAX": "ERROR"
}
}
}
}
}
""";
JsonElement settingsAsJson = new Gson().fromJson(changedSettings, JsonElement.class);
harness.changeConfiguration(new Settings(settingsAsJson));

}

Expand Down

0 comments on commit 82761e7

Please sign in to comment.