mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[json + remdev] IJPL-176240 Update test data path
GitOrigin-RevId: 9b6b98b1b9a9c98631801f24df0bd0f7463d3251
This commit is contained in:
committed by
intellij-monorepo-bot
parent
0422f3a591
commit
8d987d75ff
@@ -15,7 +15,7 @@ public class JsonParsingTest extends ParsingTestCase {
|
||||
|
||||
@Override
|
||||
protected String getTestDataPath() {
|
||||
return PlatformTestUtil.getCommunityPath() + "/json/tests/testData";
|
||||
return PlatformTestUtil.getCommunityPath() + "/json/backend/tests/testData";
|
||||
}
|
||||
|
||||
private void doTest() {
|
||||
|
||||
@@ -45,8 +45,8 @@ public abstract class JsonTestCase extends BasePlatformTestCase {
|
||||
String communityPath = PlatformTestUtil.getCommunityPath();
|
||||
String homePath = IdeaTestExecutionPolicy.getHomePathWithPolicy();
|
||||
if (communityPath.startsWith(homePath)) {
|
||||
return communityPath.substring(homePath.length()) + "/json/tests/testData";
|
||||
return communityPath.substring(homePath.length()) + "/json/backend/tests/testData";
|
||||
}
|
||||
return "/json/tests/testData";
|
||||
return "/json/backend/tests/testData";
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@ public class Json5ParsingTest extends ParsingTestCase {
|
||||
|
||||
@Override
|
||||
protected String getTestDataPath() {
|
||||
return PlatformTestUtil.getCommunityPath() + "/json/tests/testData";
|
||||
return PlatformTestUtil.getCommunityPath() + "/json/backend/tests/testData";
|
||||
}
|
||||
|
||||
private void doTest() {
|
||||
|
||||
@@ -56,9 +56,9 @@ public abstract class JsonSchemaHeavyAbstractTest extends BasePlatformTestCase {
|
||||
public String getTestDataPath() {
|
||||
PathManagerEx.TestDataLookupStrategy strategy = PathManagerEx.guessTestDataLookupStrategy();
|
||||
if (strategy.equals(PathManagerEx.TestDataLookupStrategy.COMMUNITY)) {
|
||||
return PathManager.getHomePath() + "/json" + getBasePath() + "/";
|
||||
return PathManager.getHomePath() + "/json/backend" + getBasePath() + "/";
|
||||
}
|
||||
return PathManager.getHomePath() + "/community/json" + getBasePath() + "/";
|
||||
return PathManager.getHomePath() + "/community/json/backend" + getBasePath() + "/";
|
||||
}
|
||||
|
||||
public static @NotNull String getJsonSchemaTestDataFilePath(@NotNull String jsonSchemaRelativePath) {
|
||||
@@ -70,7 +70,7 @@ public abstract class JsonSchemaHeavyAbstractTest extends BasePlatformTestCase {
|
||||
else {
|
||||
prefix = PathManager.getHomePath() + "/community/json/";
|
||||
}
|
||||
return prefix + "/tests/testData/jsonSchema/" + jsonSchemaRelativePath;
|
||||
return prefix + "backend/tests/testData/jsonSchema/" + jsonSchemaRelativePath;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -23,7 +23,7 @@ public class JsonSchemaHighlightingTest extends JsonSchemaHighlightingTestBase {
|
||||
@NotNull
|
||||
@Override
|
||||
protected String getTestDataPath() {
|
||||
return PlatformTestUtil.getCommunityPath() + "/json/tests/testData/jsonSchema/highlighting";
|
||||
return PlatformTestUtil.getCommunityPath() + "/json/backend/tests/testData/jsonSchema/highlighting";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ public class JsonSchemaReSharperHighlightingTest extends JsonSchemaHighlightingT
|
||||
@NotNull
|
||||
@Override
|
||||
protected String getTestDataPath() {
|
||||
return PlatformTestUtil.getCommunityPath() + "/json/tests/testData/jsonSchema/highlighting/resharper";
|
||||
return PlatformTestUtil.getCommunityPath() + "/json/backend/tests/testData/jsonSchema/highlighting/resharper";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ public abstract class JsonSchemaQuickFixTestBase extends JsonSchemaHighlightingT
|
||||
|
||||
@Override
|
||||
protected String getTestDataPath() {
|
||||
return PlatformTestUtil.getCommunityPath() + "/json/tests/testData/jsonSchema/highlighting";
|
||||
return PlatformTestUtil.getCommunityPath() + "/json/backend/tests/testData/jsonSchema/highlighting";
|
||||
}
|
||||
|
||||
protected void doTest(@Language("JSON") @NotNull String schema, @NotNull String text, String fixName, String afterFix) {
|
||||
|
||||
@@ -39,11 +39,11 @@ public class JsonSchemaReadTest extends BasePlatformTestCase {
|
||||
@NotNull
|
||||
@Override
|
||||
protected String getTestDataPath() {
|
||||
return PlatformTestUtil.getCommunityPath() + "/json/tests/testData/jsonSchema";
|
||||
return PlatformTestUtil.getCommunityPath() + "/json/backend/tests/testData/jsonSchema";
|
||||
}
|
||||
|
||||
public void testReadSchemaItself() throws Exception {
|
||||
final File file = new File(PlatformTestUtil.getCommunityPath(), "json/tests/testData/jsonSchema/schema.json");
|
||||
final File file = new File(PlatformTestUtil.getCommunityPath(), "json/backend/tests/testData/jsonSchema/schema.json");
|
||||
final JsonSchemaObject read = getSchemaObject(file);
|
||||
|
||||
Assert.assertEquals("http://json-schema.org/draft-04/schema", read.getId());
|
||||
@@ -104,13 +104,13 @@ public class JsonSchemaReadTest extends BasePlatformTestCase {
|
||||
}
|
||||
|
||||
public void testReadSchemaWithCustomTags() throws Exception {
|
||||
final File file = new File(PlatformTestUtil.getCommunityPath(), "json/tests/testData/jsonSchema/withNotesCustomTag.json");
|
||||
final File file = new File(PlatformTestUtil.getCommunityPath(), "json/backend/tests/testData/jsonSchema/withNotesCustomTag.json");
|
||||
final JsonSchemaObject read = getSchemaObject(file);
|
||||
Assert.assertNotNull(read.getDefinitionByName("common").getPropertyByName("id"));
|
||||
}
|
||||
|
||||
public void testArrayItemsSchema() throws Exception {
|
||||
final File file = new File(PlatformTestUtil.getCommunityPath(), "json/tests/testData/jsonSchema/arrayItemsSchema.json");
|
||||
final File file = new File(PlatformTestUtil.getCommunityPath(), "json/backend/tests/testData/jsonSchema/arrayItemsSchema.json");
|
||||
final JsonSchemaObject read = getSchemaObject(file);
|
||||
Iterable<String> iterable = () -> read.getPropertyNames();
|
||||
var properties = StreamSupport.stream(iterable.spliterator(), false).toList();
|
||||
@@ -135,11 +135,11 @@ public class JsonSchemaReadTest extends BasePlatformTestCase {
|
||||
}
|
||||
|
||||
public void testReadSchemaWithWrongRequired() throws Exception {
|
||||
doTestSchemaReadNotHung(new File(PlatformTestUtil.getCommunityPath(), "json/tests/testData/jsonSchema/WithWrongRequired.json"));
|
||||
doTestSchemaReadNotHung(new File(PlatformTestUtil.getCommunityPath(), "json/backend/tests/testData/jsonSchema/WithWrongRequired.json"));
|
||||
}
|
||||
|
||||
public void testReadSchemaWithWrongItems() throws Exception {
|
||||
doTestSchemaReadNotHung(new File(PlatformTestUtil.getCommunityPath(), "json/tests/testData/jsonSchema/WithWrongItems.json"));
|
||||
doTestSchemaReadNotHung(new File(PlatformTestUtil.getCommunityPath(), "json/backend/tests/testData/jsonSchema/WithWrongItems.json"));
|
||||
}
|
||||
|
||||
public void testReadNestedSchemaObject() {
|
||||
|
||||
+2
-2
@@ -393,9 +393,9 @@ internal class JsonSchemaObjectReadingMergingTest : BasePlatformTestCase() {
|
||||
override fun getTestDataPath(): String {
|
||||
val strategy = PathManagerEx.guessTestDataLookupStrategy()
|
||||
if (strategy == TestDataLookupStrategy.COMMUNITY) {
|
||||
return PathManager.getHomePath() + "/json/tests/testData/jsonSchema/v2"
|
||||
return PathManager.getHomePath() + "/json/backend/tests/testData/jsonSchema/v2"
|
||||
}
|
||||
return PathManager.getHomePath() + "/community/json/tests/testData/jsonSchema/v2"
|
||||
return PathManager.getHomePath() + "/community/json/backend/tests/testData/jsonSchema/v2"
|
||||
}
|
||||
|
||||
private fun propertyDependencySchema(): String {
|
||||
|
||||
@@ -7,6 +7,6 @@ import com.intellij.testFramework.PlatformTestUtil
|
||||
|
||||
abstract class JsonPathParsingTestCase(subFolder: String) : ParsingTestCase(subFolder, ".jsonpath", JsonPathParserDefinition()) {
|
||||
override fun getTestDataPath(): String {
|
||||
return PlatformTestUtil.getCommunityPath() + "/json/tests/testData/jsonpath/parser"
|
||||
return PlatformTestUtil.getCommunityPath() + "/json/backend/tests/testData/jsonpath/parser"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user