@@ -32,46 +32,47 @@ public abstract class AbstractIdeContextTest extends Assertions {
32
32
private static final int CHUNK_SIZE = 1024 ;
33
33
34
34
/**
35
- * @param projectName the (folder)name of the test project in {@link #PATH_PROJECTS}. E.g. "basic".
35
+ * @param projectTestCaseName the (folder)name of the project test case, in this folder a 'project' folder represents
36
+ * the test project in {@link #PATH_PROJECTS}. E.g. "basic".
36
37
* @return the {@link IdeTestContext} pointing to that project.
37
38
*/
38
- protected IdeTestContext newContext (String projectName ) {
39
+ protected IdeTestContext newContext (String projectTestCaseName ) {
39
40
40
- return newContext (projectName , null , true );
41
+ return newContext (projectTestCaseName , null , true );
41
42
}
42
43
43
44
/**
44
- * @param projectName the (folder)name of the test project in {@link #PATH_PROJECTS}. E.g. "basic".
45
+ * @param projectTestCaseName the (folder)name of the project test case, in this folder a 'project' folder represents
46
+ * the test project in {@link #PATH_PROJECTS}. E.g. "basic".
45
47
* @param projectPath the relative path inside the test project where to create the context.
46
48
* @return the {@link IdeTestContext} pointing to that project.
47
49
*/
48
- protected static IdeTestContext newContext (String projectName , String projectPath ) {
50
+ protected static IdeTestContext newContext (String projectTestCaseName , String projectPath ) {
49
51
50
- return newContext (projectName , projectPath , true );
52
+ return newContext (projectTestCaseName , projectPath , true );
51
53
}
52
54
53
55
/**
54
- * @param projectName the (folder)name of the test project in {@link #PATH_PROJECTS}. E.g. "basic".
56
+ * @param projectTestCaseName the (folder)name of the project test case, in this folder a 'project' folder represents
57
+ * the test project in {@link #PATH_PROJECTS}. E.g. "basic".
55
58
* @param projectPath the relative path inside the test project where to create the context.
56
59
* @param copyForMutation - {@code true} to create a copy of the project that can be modified by the test,
57
60
* {@code false} otherwise (only to save resources if you are 100% sure that your test never modifies anything
58
- * in that project.
61
+ * in that project.)
59
62
* @return the {@link IdeTestContext} pointing to that project.
60
63
*/
61
- protected static IdeTestContext newContext (String projectName , String projectPath , boolean copyForMutation ) {
64
+ protected static IdeTestContext newContext (String projectTestCaseName , String projectPath , boolean copyForMutation ) {
62
65
63
- Path sourceDir = PATH_PROJECTS .resolve (projectName );
64
- Path userDir = sourceDir ;
66
+ Path sourceDir = PATH_PROJECTS .resolve (projectTestCaseName );
67
+ Path userDir = sourceDir . resolve ( "project" ) ;
65
68
IdeTestContext context ;
66
69
if (copyForMutation ) {
67
- Path projectDir = PATH_PROJECTS_COPY .resolve (projectName );
70
+ Path projectDir = PATH_PROJECTS_COPY .resolve (projectTestCaseName );
68
71
FileAccess fileAccess = new FileAccessImpl (IdeTestContextMock .get ());
69
72
fileAccess .delete (projectDir );
70
73
fileAccess .mkdirs (PATH_PROJECTS_COPY );
71
74
fileAccess .copy (sourceDir , projectDir , FileCopyMode .COPY_TREE_OVERRIDE_TREE );
72
- fileAccess .copy (PATH_PROJECTS .resolve (IdeContext .FOLDER_IDE ), PATH_PROJECTS_COPY .resolve (IdeContext .FOLDER_IDE ),
73
- FileCopyMode .COPY_TREE_OVERRIDE_TREE );
74
- userDir = projectDir ;
75
+ userDir = projectDir .resolve ("project" );
75
76
}
76
77
if (projectPath != null ) {
77
78
userDir = userDir .resolve (projectPath );
0 commit comments