// Path: stecker-plugin-loader/src/test/java/org/meridor/stecker/TemporaryDirectory.java
// public class TemporaryDirectory extends ExternalResource {
// 
//     private Path directory;
// 
//     @Override
//     protected void before() throws Throwable {
//         super.before();
//         create();
//     }
// 
//     private void create() throws IOException {
//         directory = FileSystemHelper.createTempDirectory();
//     }
// 
//     @Override
//     protected void after() {
//         super.after();
//         remove();
//     }
// 
//     private void remove() {
//         try {
//             FileSystemHelper.removeDirectory(directory);
//         } catch (IOException e) {
//             System.out.println("Can't remove temporary directory");
//             e.printStackTrace();
//         }
//     }
// 
//     public Path getDirectory() {
//         return directory;
//     }
// 
//     public Path createFile(String fileName, byte[] contents) throws IOException {
//         Path filePath = directory.resolve(fileName);
//         Files.write(filePath, contents);
//         return filePath;
//     }
// }


import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.meridor.stecker.TemporaryDirectory;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.List;
import static org.hamcrest.Matchers.hasItem;
import static org.hamcrest.Matchers.hasSize;
import static org.junit.Assert.assertThat;
package org.meridor.stecker.dev;




public class DevPluginsProviderTest {

    @Rule
    public TemporaryDirectory temporaryDirectory = new TemporaryDirectory();

    private Path baseDirectory;
    private Path matchingDirectory;

    @Before
    public void createTestFiles() throws IOException {
        baseDirectory = temporaryDirectory.getDirectory();
        matchingDirectory = baseDirectory.resolve("directory-name-containing-plugin");
        Files.createDirectories(matchingDirectory);

        Path notMatchingDirectory = baseDirectory.resolve("not-matching-directory");
        Files.createDirectories(notMatchingDirectory);

        Path matchingFile = baseDirectory.resolve("file-name-containing-plugin");
        Files.createFile(matchingFile);
    }

    @Test
    public void testProvide() throws Exception {
        DevPluginsProvider devPluginsProvider = new DevPluginsProvider();
        List<Path> pluginPaths = devPluginsProvider.provide(baseDirectory);
// Path: stecker-plugin-loader/src/test/java/org/meridor/stecker/TemporaryDirectory.java
// public class TemporaryDirectory extends ExternalResource {
// 
//     private Path directory;
// 
//     @Override
//     protected void before() throws Throwable {
//         super.before();
//         create();
//     }
// 
//     private void create() throws IOException {
//         directory = FileSystemHelper.createTempDirectory();
//     }
// 
//     @Override
//     protected void after() {
//         super.after();
//         remove();
//     }
// 
//     private void remove() {
//         try {
//             FileSystemHelper.removeDirectory(directory);
//         } catch (IOException e) {
//             System.out.println("Can't remove temporary directory");
//             e.printStackTrace();
//         }
//     }
// 
//     public Path getDirectory() {
//         return directory;
//     }
// 
//     public Path createFile(String fileName, byte[] contents) throws IOException {
//         Path filePath = directory.resolve(fileName);
//         Files.write(filePath, contents);
//         return filePath;
//     }
// }


// Path: stecker-plugin-loader/src/test/java/org/meridor/stecker/dev/DevPluginsProviderTest.java
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.meridor.stecker.TemporaryDirectory;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.List;
import static org.hamcrest.Matchers.hasItem;
import static org.hamcrest.Matchers.hasSize;
import static org.junit.Assert.assertThat;

package org.meridor.stecker.dev;




public class DevPluginsProviderTest {

    @Rule
    public TemporaryDirectory temporaryDirectory = new TemporaryDirectory();

    private Path baseDirectory;
    private Path matchingDirectory;

    @Before
    public void createTestFiles() throws IOException {
        baseDirectory = temporaryDirectory.getDirectory();
        matchingDirectory = baseDirectory.resolve("directory-name-containing-plugin");
        Files.createDirectories(matchingDirectory);

        Path notMatchingDirectory = baseDirectory.resolve("not-matching-directory");
        Files.createDirectories(notMatchingDirectory);

        Path matchingFile = baseDirectory.resolve("file-name-containing-plugin");
        Files.createFile(matchingFile);
    }

    @Test
    public void testProvide() throws Exception {
        DevPluginsProvider devPluginsProvider = new DevPluginsProvider();
        List<Path> pluginPaths = devPluginsProvider.provide(baseDirectory);
        assertThat(pluginPaths, hasSize(1));