{"id":20474156,"url":"https://github.com/marschall/memoryfilesystem-junit-provider","last_synced_at":"2026-01-24T00:18:43.313Z","repository":{"id":168753234,"uuid":"640540318","full_name":"marschall/memoryfilesystem-junit-provider","owner":"marschall","description":"A Memoryfilesystem based @TempDir provider for JUnit","archived":false,"fork":false,"pushed_at":"2024-09-06T13:09:33.000Z","size":36,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T02:43:13.581Z","etag":null,"topics":["filesystem","inmemory","junit","junit5","unit-testing"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marschall.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-14T12:41:57.000Z","updated_at":"2024-09-06T13:09:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"da3001fc-5553-4fae-97b1-5ea4eeda1044","html_url":"https://github.com/marschall/memoryfilesystem-junit-provider","commit_stats":null,"previous_names":["marschall/memoryfilesystem-junit-provider"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marschall%2Fmemoryfilesystem-junit-provider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marschall%2Fmemoryfilesystem-junit-provider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marschall%2Fmemoryfilesystem-junit-provider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marschall%2Fmemoryfilesystem-junit-provider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marschall","download_url":"https://codeload.github.com/marschall/memoryfilesystem-junit-provider/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248705542,"owners_count":21148549,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["filesystem","inmemory","junit","junit5","unit-testing"],"created_at":"2024-11-15T14:28:24.591Z","updated_at":"2026-01-24T00:18:43.308Z","avatar_url":"https://github.com/marschall.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Memoryfilesystem JUnit Provider [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.marschall/memoryfilesystem-junit-provider/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.marschall/memoryfilesystem-junit-provider) [![Javadocs](https://www.javadoc.io/badge/com.github.marschall/memoryfilesystem-junit-provider.svg)](https://www.javadoc.io/doc/com.github.marschall/memoryfilesystem-junit-provider)\n===============================\n\nA memoryfilesystem based [@TempDir](https://junit.org/junit5/docs/current/api/org.junit.jupiter.api/org/junit/jupiter/api/io/TempDir.html) provider for JUnit 5.10+.\n\nOnly `Path` is supported, `File` can not be supported.\n\n- versions 2.x are for JUnit 6 and require Java 17\n- version 1.x are for Junit 5 and require Java 8\n\nUsage\n-----\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.github.marschall\u003c/groupId\u003e\n  \u003cartifactId\u003ememoryfilesystem-junit-provider\u003c/artifactId\u003e\n  \u003cversion\u003e2.0.1\u003c/version\u003e\n  \u003cscope\u003etest\u003c/scope\u003e\n\u003c/dependency\u003e\n```\n\nYou can either change individual elements annoated with `@TempDir` to use memoryfilesystem by use of the `factory` annotation value.\n\n```java\nclass SomeTests {\n\n  @TempDir(factory = MemoryFileSystemTempDirFactory.class)\n  Path tempDirectory;\n\n  @Test\n  void someTest() {\n    Path input = Files.createFile(this.tempDirectory.resolve(\"input.txt\"));\n    // test code\n  }\n\n}\n\n```\n\nAlternatively you can also use the `@MemoryTempDir` meta-annotation.\n\n```java\nclass SomeTests {\n\n  @MemoryTempDir\n  Path tempDirectory;\n\n  @Test\n  void someTest() {\n    Path input = Files.createFile(this.tempDirectory.resolve(\"input.txt\"));\n    // test code\n  }\n\n}\n\n```\n\nGlobal Configuration\n--------------------\n\nYou can also make all elements annoated with `@TempDir` to use memoryfilesystem by use of the [junit.jupiter.tempdir.factory.default](https://junit.org/junit5/docs/current/api/org.junit.jupiter.api/org/junit/jupiter/api/io/TempDir.html#DEFAULT_FACTORY_PROPERTY_NAME) configuration property.\n\n```properties\njunit.jupiter.tempdir.factory.default=com.github.marschall.memoryfilesystem.junit.MemoryFileSystemTempDirFactory\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarschall%2Fmemoryfilesystem-junit-provider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarschall%2Fmemoryfilesystem-junit-provider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarschall%2Fmemoryfilesystem-junit-provider/lists"}