Skip to content

Commit

Permalink
Add action tests and release docs
Browse files Browse the repository at this point in the history
  • Loading branch information
opwvhk committed Sep 5, 2024
1 parent affd7f3 commit 1a1a7c3
Showing 1 changed file with 2 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
import com.intellij.testFramework.HeavyPlatformTestCase;
import com.intellij.testFramework.MapDataContext;
import com.intellij.testFramework.TestActionEvent;
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
import com.intellij.testFramework.fixtures.TempDirTestFixture;

import java.io.IOException;
import java.nio.file.Files;
Expand All @@ -20,10 +18,7 @@

import static org.assertj.core.api.Assertions.assertThat;

public class AvroIdlActionsTest extends
//HeavyPlatformTestCase {
BasePlatformTestCase {

public class AvroIdlActionsTest extends HeavyPlatformTestCase {
private Path inputDirectory;
private Path outputDirectory;
private Path resultDirectory;
Expand All @@ -36,11 +31,7 @@ public void setUp() throws Exception {
inputDirectory = testDirectory.resolve("input");
outputDirectory = testDirectory.resolve("output");

TempDirTestFixture tempDirFixture = myFixture.getTempDirFixture();
String tempDirPath = tempDirFixture.getTempDirPath();
VirtualFile testFilesDirectory = tempDirFixture.copyAll(getTestDirectoryName(), getTestDirectoryName());
VirtualFile resultVDirectory = tempDirFixture.findOrCreateDir(getTestDirectoryName() + "/results");
//VirtualFile resultVDirectory = getTempDir().createVirtualDir(getTestDirectoryName());
VirtualFile resultVDirectory = getTempDir().createVirtualDir(getTestDirectoryName());
ConversionActionBase.targetDirectory = resultVDirectory;
resultDirectory = resultVDirectory.toNioPath();

Expand Down Expand Up @@ -139,10 +130,4 @@ private static <T> T list(Path path, Function<Stream<Path>, T> function) throws
return function.apply(stream);
}
}

private static List<Path> list(Stream<Path> stream) throws IOException {
try (Stream<Path> s = stream) {
return s.toList();
}
}
}

0 comments on commit 1a1a7c3

Please sign in to comment.