From 1d98fded88d6fc41f48367e808da1d86234f2220 Mon Sep 17 00:00:00 2001 From: Anjana S Porawagama Date: Wed, 29 Nov 2023 13:24:19 +0530 Subject: [PATCH] Update tests --- .../org/ballerinalang/langserver/packages/ComponentsTest.java | 4 ++-- .../packages/components/project-exception_expected.json | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 language-server/modules/langserver-core/src/test/resources/packages/components/project-exception_expected.json diff --git a/language-server/modules/langserver-core/src/test/java/org/ballerinalang/langserver/packages/ComponentsTest.java b/language-server/modules/langserver-core/src/test/java/org/ballerinalang/langserver/packages/ComponentsTest.java index bde559486cd7..eeaf2c24a8f8 100644 --- a/language-server/modules/langserver-core/src/test/java/org/ballerinalang/langserver/packages/ComponentsTest.java +++ b/language-server/modules/langserver-core/src/test/java/org/ballerinalang/langserver/packages/ComponentsTest.java @@ -61,7 +61,6 @@ public void packageComponentsTestCase(String[] projects, String expected) throws List filePaths = new ArrayList<>(); for (String project : projects) { Path path = configsPath.resolve(project).resolve("main.bal").toAbsolutePath(); - TestUtil.openDocument(serviceEndpoint, path); filePaths.add(path.toString()); } @@ -133,7 +132,8 @@ public Object[][] getDataProvider() { {new String[]{"project", "project-functions", "project-services", "single-file"}, "multiple-packages_expected.json"}, {new String[]{"single-file"}, "single-file-package_expected.json"}, - {new String[]{"project-other"}, "project-other_expected.json"} + {new String[]{"project-other"}, "project-other_expected.json"}, + {new String[]{"non-exist"}, "project-exception_expected.json"} }; } } diff --git a/language-server/modules/langserver-core/src/test/resources/packages/components/project-exception_expected.json b/language-server/modules/langserver-core/src/test/resources/packages/components/project-exception_expected.json new file mode 100644 index 000000000000..4677642a3ac7 --- /dev/null +++ b/language-server/modules/langserver-core/src/test/resources/packages/components/project-exception_expected.json @@ -0,0 +1,3 @@ +{ + "result": [] +}