Skip to content

Commit

Permalink
WIP. first step.
Browse files Browse the repository at this point in the history
  • Loading branch information
khmarbaise committed Jul 31, 2023
1 parent f191415 commit 332401a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
/**
* @author Karl Heinz Marbaise
*/
@MemoryFileSystem
class FileSelectorTest {

@Test
Expand Down
18 changes: 18 additions & 0 deletions src/test/java/com/soebes/module/calculator/MemoryFileSystem.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package com.soebes.module.calculator;


import org.junit.jupiter.api.extension.ExtendWith;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@ExtendWith(MemoryFileSystemExtension.class)
@Documented
public @interface MemoryFileSystem {
}

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import java.nio.file.FileSystem;

class FileSystemExtension implements BeforeEachCallback, AfterEachCallback {
class MemoryFileSystemExtension implements BeforeEachCallback, AfterEachCallback {

private FileSystem fileSystem;

Expand All @@ -17,7 +17,7 @@ FileSystem getFileSystem() {

@Override
public void beforeEach(ExtensionContext context) throws Exception {
this.fileSystem = MemoryFileSystemBuilder.newEmpty().build("name");
this.fileSystem = MemoryFileSystemBuilder.newEmpty().build();
}

@Override
Expand Down

0 comments on commit 332401a

Please sign in to comment.