mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-04 15:06:56 +07:00
[jps model tests] adapt test for invalid project configurations to the new implementation (IJPL-409)
The new implementation based on the workspace model behaves slightly differently for some projects with invalid configurations, tests should tolerate this. GitOrigin-RevId: fa5a7c888aa60ff27507bff3b9a05fc3d68ececc
This commit is contained in:
committed by
intellij-monorepo-bot
parent
8b44a792d5
commit
ac5b260e40
@@ -252,15 +252,21 @@ public class JpsProjectSerializationTest {
|
||||
|
||||
@Test
|
||||
public void testMissingImlFile() {
|
||||
JpsProjectData projectData = loadProject("jps/model-serialization/testData/missingImlFile/missingImlFile.ipr");
|
||||
UsefulTestCase.assertEmpty(projectData.getProject().getModules());
|
||||
loadProject("jps/model-serialization/testData/missingImlFile/missingImlFile.ipr");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMissingContentUrlAttribute() {
|
||||
JpsProjectData projectData = loadProject("jps/model-serialization/testData/missingContentUrlAttribute/missingContentUrlAttribute.ipr");
|
||||
JpsModule module = assertOneElement(projectData.getProject().getModules());
|
||||
assertEquals("missingContentUrlAttribute", module.getName());
|
||||
try {
|
||||
JpsProjectData projectData = loadProject("jps/model-serialization/testData/missingContentUrlAttribute/missingContentUrlAttribute.ipr");
|
||||
//the current implementation silently skips missing modules
|
||||
JpsModule module = assertOneElement(projectData.getProject().getModules());
|
||||
assertEquals("missingContentUrlAttribute", module.getName());
|
||||
}
|
||||
catch (CannotLoadJpsModelException e) {
|
||||
//the new implementation throws an exception
|
||||
assertEquals("missingContentUrlAttribute.iml", e.getFile().getName());
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user