-
Notifications
You must be signed in to change notification settings - Fork 382
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#7780: fix ClasspathAddMvnDepsMagicCommandTest under windows
- Loading branch information
1 parent
91c974d
commit dbc261b
Showing
7 changed files
with
68 additions
and
61 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
kernel/base/src/main/java/com/twosigma/beakerx/kernel/magic/command/FileServiceImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.twosigma.beakerx.kernel.magic.command; | ||
|
||
import com.twosigma.beakerx.kernel.magic.command.functionality.FileService; | ||
import org.apache.commons.io.FileUtils; | ||
|
||
import java.io.File; | ||
|
||
public class FileServiceImpl implements FileService { | ||
|
||
@Override | ||
public void delete(File file) { | ||
FileUtils.deleteQuietly(file); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
...se/src/main/java/com/twosigma/beakerx/kernel/magic/command/functionality/FileService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.twosigma.beakerx.kernel.magic.command.functionality; | ||
|
||
import java.io.File; | ||
|
||
public interface FileService { | ||
void delete(File file); | ||
} |
21 changes: 21 additions & 0 deletions
21
kernel/base/src/test/java/com/twosigma/beakerx/FileServiceMock.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.twosigma.beakerx; | ||
|
||
import com.twosigma.beakerx.kernel.magic.command.functionality.FileService; | ||
|
||
import java.io.File; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public class FileServiceMock implements FileService { | ||
|
||
private List<String> deletedFiles = new ArrayList<>(); | ||
|
||
@Override | ||
public void delete(File file) { | ||
this.deletedFiles.add(file.getAbsolutePath()); | ||
} | ||
|
||
public List<String> getDeletedFiles() { | ||
return deletedFiles; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters