Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce a TemporaryFolder extension #1247

Closed
1 task done
sbrannen opened this issue Jan 18, 2018 · 14 comments
Closed
1 task done

Introduce a TemporaryFolder extension #1247

sbrannen opened this issue Jan 18, 2018 · 14 comments

Comments

@sbrannen
Copy link
Member

@sbrannen sbrannen commented Jan 18, 2018

Overview

See discussion at junit-team/junit5-samples#4.

Related Issues

Deliverables

  • Introduce an official TemporaryFolder extension for JUnit Jupiter analogous to the rule support in JUnit 4.
@sormuras
Copy link
Member

@sormuras sormuras commented Apr 11, 2018

@Siedlerchr
Copy link

@Siedlerchr Siedlerchr commented May 5, 2018

It would really been nice to have this feature available in the next release as it is still a deal-breaker in the complete migration to junit Jupiter.

@marcphilipp marcphilipp removed this from the 5.3 Backlog milestone May 5, 2018
@marcphilipp
Copy link
Member

@marcphilipp marcphilipp commented May 5, 2018

This will be done in the half-official extensions project: junit-pioneer/junit-pioneer#39.

@marcphilipp marcphilipp closed this May 5, 2018
@britter
Copy link
Collaborator

@britter britter commented Jul 10, 2018

Still waiting on the first junit-pioneer release... :(

@sormuras
Copy link
Member

@sormuras sormuras commented Jul 10, 2018

Only some more minutes...

@britter
Copy link
Collaborator

@britter britter commented Jul 10, 2018

There it is! Thank you! 🙏

@wilkinsona
Copy link

@wilkinsona wilkinsona commented Nov 28, 2018

Having TempDirectory be part of JUnit Pioneer has a few downsides:

  1. It requires knowledge of another dependency
  2. It requires management of another dependency version
  3. It has the unpleasant side effect of polluting the classpath with another @Test annotation

1 and 2 are only annoying when figuring out what JUnit 5's equivalent of TemporaryFolder might be. 3 is a constant annoyance when writing tests. That annoyance can be mitigated somewhat by everyone configuring their IDEs to avoid suggesting org.junitpioneer.vintage.Test.

Could the decision to move a core, and very useful, piece of JUnit 4 into a half-official extensions project please be reconsidered?

@guenhter
Copy link

@guenhter guenhter commented Nov 28, 2018

While such features are in experimental mode, having a dedicated dependency which only contains the extension would be helpful. This can then just be included additionally to the official Junit5 dependency.

@sbrannen
Copy link
Member Author

@sbrannen sbrannen commented Nov 28, 2018

Could the decision to move a core, and very useful, piece of JUnit 4 into a half-official extensions project please be reconsidered?

Hi @wilkinsona,

I'll bring it up with the team for renewed discussion.

@sbrannen sbrannen reopened this Nov 28, 2018
@sbrannen sbrannen added this to the 5.4 M1 milestone Nov 28, 2018
sijie123 added a commit to sijie123/CS2103-DeadlineManager that referenced this issue Feb 10, 2019
Currently, JUnit 5.1.0 is used to write JUnit 5 styled tests.

JUnit 5.1.0 does not support creating Temporary Folders natively, and relies on having to create a custom TemporaryFolder extension or relying on JUnit-Pioneer library [1]. Both of these solutions make it complicated to implement and understand. JUnit 5.4.0 is the first version of JUnit that supports native TemporaryFolder extension [2].

Hence, let's use JUnit 5.4.0 instead to reduce the complexity of implementing TemporaryFolder.

[1] https://medium.com/@GalletVictor/migration-from-junit-4-to-junit-5-d8fe38644abe
[2] junit-team/junit5#1247
sijie123 added a commit to sijie123/CS2103-DeadlineManager that referenced this issue Feb 23, 2019
Currently, JUnit 5.1.0 is used to write JUnit 5 styled tests.

JUnit 5.1.0 does not support creating Temporary Folders natively, and relies on having to create a custom TemporaryFolder extension or relying on JUnit-Pioneer library [1]. Both of these solutions make it complicated to implement and understand. JUnit 5.4.0 is the first version of JUnit that supports native TemporaryFolder extension [2].

Hence, let's use JUnit 5.4.0 instead to reduce the complexity of implementing TemporaryFolder.

[1] https://medium.com/@GalletVictor/migration-from-junit-4-to-junit-5-d8fe38644abe
[2] junit-team/junit5#1247
sijie123 added a commit to sijie123/CS2103-DeadlineManager that referenced this issue Feb 23, 2019
Currently, JUnit 5.1.0 is used to write JUnit 5 styled tests.

JUnit 5.1.0 does not support creating Temporary Folders natively, and relies on having to create a custom TemporaryFolder extension or relying on JUnit-Pioneer library [1]. Both of these solutions make it complicated to implement and understand. JUnit 5.4.0 is the first version of JUnit that supports native TemporaryFolder extension [2].

Hence, let's use JUnit 5.4.0 instead to reduce the complexity of implementing TemporaryFolder.

[1] https://medium.com/@GalletVictor/migration-from-junit-4-to-junit-5-d8fe38644abe
[2] junit-team/junit5#1247
sijie123 added a commit to sijie123/CS2103-DeadlineManager that referenced this issue Feb 24, 2019
Currently, JUnit 5.1.0 is used to write JUnit 5 styled tests.

JUnit 5.1.0 does not support creating Temporary Folders natively, and
relies on having to create a custom TemporaryFolder extension or
relying on JUnit-Pioneer library [1]. Both of these solutions make it
complicated to implement and understand. JUnit 5.4.0 is the first
version of JUnit that supports native TemporaryFolder extension [2].

Hence, let's use JUnit 5.4.0 instead to reduce the complexity of
implementing TemporaryFolder.

[1]
https://medium.com/@GalletVictor/migration-from-junit-4-to-junit-5-d8fe38644abe
[2] junit-team/junit5#1247
sijie123 added a commit to sijie123/CS2103-DeadlineManager that referenced this issue Feb 24, 2019
Currently, JUnit 5.1.0 is used to write JUnit 5 styled tests.

JUnit 5.1.0 does not support creating Temporary Folders natively, and
relies on having to create a custom TemporaryFolder extension or
relying on JUnit-Pioneer library [1]. Both of these solutions make it
complicated to implement and understand. JUnit 5.4.0 is the first
version of JUnit that supports native TemporaryFolder extension [2].

Hence, let's use JUnit 5.4.0 instead to reduce the complexity of
implementing TemporaryFolder.

[1]
https://medium.com/@GalletVictor/migration-from-junit-4-to-junit-5-d8fe38644abe
[2] junit-team/junit5#1247
sijie123 added a commit to sijie123/CS2103-DeadlineManager that referenced this issue Mar 16, 2019
Currently, JUnit 5.1.0 is used to write JUnit 5 styled tests.

JUnit 5.1.0 does not support creating Temporary Folders natively, and
relies on having to create a custom TemporaryFolder extension or
relying on JUnit-Pioneer library [1]. Both of these solutions make it
complicated to implement and understand. JUnit 5.4.0 is the first
version of JUnit that supports native TemporaryFolder extension [2].

Hence, let's use JUnit 5.4.0 instead to reduce the complexity of
implementing TemporaryFolder.

[1]
https://medium.com/@GalletVictor/migration-from-junit-4-to-junit-5-d8fe38644abe
[2] junit-team/junit5#1247
sijie123 added a commit to sijie123/CS2103-DeadlineManager that referenced this issue Mar 16, 2019
Currently, JUnit 5.1.0 is used to write JUnit 5 styled tests.

JUnit 5.1.0 does not support creating Temporary Folders natively, and
relies on having to create a custom TemporaryFolder extension or
relying on JUnit-Pioneer library [1]. Both of these solutions make it
complicated to implement and understand. JUnit 5.4.0 is the first
version of JUnit that supports native TemporaryFolder extension [2].

Hence, let's use JUnit 5.4.0 instead to reduce the complexity of
implementing TemporaryFolder.

[1]
https://medium.com/@GalletVictor/migration-from-junit-4-to-junit-5-d8fe38644abe
[2] junit-team/junit5#1247
sijie123 added a commit to sijie123/CS2103-DeadlineManager that referenced this issue Mar 23, 2019
We write our tests using the JUnit 5.1.0 API. The JUnit 5.1.0 API
contains most features we require, such as assertTrue or assertThrows.

We have unit tests such as StorageManagerTest#prefsReadSave that
require writing to the filesystem. These tests need to make use of
temporary directories. This is so that
(1) we can begin with a clean, known state at the start of each test
and
(2) we can prevent our test output from polluting the user's file
system.

However, JUnit 5.1.0 does not support creating temporary directories
natively, so developers need to create a custom TemporaryDirectory
implementation or rely on JUnit-Pioneer library [1]. Both of these
solutions make it complicated to implement and for future developers
to understand.

JUnit 5.4.0 is the first version of JUnit that has a native temporary
directory API [2]. By upgrading to JUnit 5.4.0, we can directly use
the org.junit.jupiter.api.io.TempDir API.
This reduces the complexity of implementing a temporary directory.

Let's upgrade to use JUnit 5.4.0.

[1] https://medium.com/@GalletVictor/migration-from-junit-4-to-junit-5-d8fe38644abe
[2] junit-team/junit5#1247
sijie123 added a commit to sijie123/CS2103-DeadlineManager that referenced this issue Mar 28, 2019
We write our tests using the JUnit 5.1.0 API. The JUnit 5.1.0 API
contains most features we require, such as assertTrue or assertThrows.

We have unit tests such as StorageManagerTest#prefsReadSave that
require writing to the filesystem. These tests need to make use of
temporary directories. This is so that
(1) we can begin with a clean, known state at the start of each test
and
(2) we can prevent our test output from polluting the user's file
system.

However, JUnit 5.1.0 does not support creating temporary directories
natively, so developers need to create a custom TemporaryDirectory
implementation or rely on JUnit-Pioneer library [1]. Both of these
solutions make it complicated to implement and for future developers
to understand.

JUnit 5.4.0 is the first version of JUnit that has a native temporary
directory API [2]. By upgrading to JUnit 5.4.0, we can directly use
the org.junit.jupiter.api.io.TempDir API.
This reduces the complexity of implementing a temporary directory.

Let's upgrade to use JUnit 5.4.0.

[1] https://medium.com/@GalletVictor/migration-from-junit-4-to-junit-5-d8fe38644abe
[2] junit-team/junit5#1247
sijie123 added a commit to sijie123/CS2103-DeadlineManager that referenced this issue Apr 1, 2019
We write our tests using the JUnit 5.1.0 API. The JUnit 5.1.0 API
contains most features we require, such as assertTrue or assertThrows.

We have unit tests such as StorageManagerTest#prefsReadSave that
require writing to the filesystem. These tests need to make use of
temporary directories. This is so that
(1) we can begin with a clean, known state at the start of each test
and
(2) we can prevent our test output from polluting the user's file
system.

However, JUnit 5.1.0 does not support creating temporary directories
natively, so developers need to create a custom TemporaryDirectory
implementation or rely on JUnit-Pioneer library [1]. Both of these
solutions make it complicated to implement and for future developers
to understand.

JUnit 5.4.0 is the first version of JUnit that has a native temporary
directory API [2]. By upgrading to JUnit 5.4.0, we can directly use
the org.junit.jupiter.api.io.TempDir API.
This reduces the complexity of implementing a temporary directory.

Let's upgrade to use JUnit 5.4.0.

[1] https://medium.com/@GalletVictor/migration-from-junit-4-to-junit-5-d8fe38644abe
[2] junit-team/junit5#1247
sijie123 added a commit to sijie123/CS2103-DeadlineManager that referenced this issue Apr 13, 2019
We write our tests using the JUnit 5.1.0 API. The JUnit 5.1.0 API
contains most features we require, such as assertTrue or assertThrows.

We have unit tests such as StorageManagerTest#prefsReadSave that
require writing to the filesystem. These tests need to make use of
temporary directories. This is so that
(1) we can begin with a clean, known state at the start of each test
and
(2) we can prevent our test output from polluting the user's file
system.

However, JUnit 5.1.0 does not support creating temporary directories
natively, so developers need to create a custom TemporaryDirectory
implementation or rely on JUnit-Pioneer library [1]. Both of these
solutions make it complicated to implement and for future developers
to understand.

JUnit 5.4.0 is the first version of JUnit that has a native temporary
directory API [2]. By upgrading to JUnit 5.4.0, we can directly use
the org.junit.jupiter.api.io.TempDir API.
This reduces the complexity of implementing a temporary directory.

Let's upgrade to use JUnit 5.4.0.

[1] https://medium.com/@GalletVictor/migration-from-junit-4-to-junit-5-d8fe38644abe
[2] junit-team/junit5#1247
sijie123 added a commit to sijie123/CS2103-DeadlineManager that referenced this issue Apr 13, 2019
We write our tests using the JUnit 5.1.0 API. The JUnit 5.1.0 API
contains most features we require, such as assertTrue or assertThrows.

We have unit tests such as StorageManagerTest#prefsReadSave that
require writing to the filesystem. These tests need to make use of
temporary directories. This is so that
(1) we can begin with a clean, known state at the start of each test
and
(2) we can prevent our test output from polluting the user's file
system.

However, JUnit 5.1.0 does not support creating temporary directories
natively, so developers need to create a custom TemporaryDirectory
implementation or rely on JUnit-Pioneer library [1]. Both of these
solutions make it complicated to implement and for future developers
to understand.

JUnit 5.4.0 is the first version of JUnit that has a native temporary
directory API [2]. By upgrading to JUnit 5.4.0, we can directly use
the org.junit.jupiter.api.io.TempDir API.
This reduces the complexity of implementing a temporary directory.

Let's upgrade to use JUnit 5.4.0.

[1] https://medium.com/@GalletVictor/migration-from-junit-4-to-junit-5-d8fe38644abe
[2] junit-team/junit5#1247
sijie123 added a commit to sijie123/CS2103-DeadlineManager that referenced this issue Apr 13, 2019
We write our tests using the JUnit 5.1.0 API. The JUnit 5.1.0 API
contains most features we require, such as assertTrue or assertThrows.

We have unit tests such as StorageManagerTest#prefsReadSave that
require writing to the filesystem. These tests need to make use of
temporary directories. This is so that
(1) we can begin with a clean, known state at the start of each test
and
(2) we can prevent our test output from polluting the user's file
system.

However, JUnit 5.1.0 does not support creating temporary directories
natively, so developers need to create a custom TemporaryDirectory
implementation or rely on JUnit-Pioneer library [1]. Both of these
solutions make it complicated to implement and for future developers
to understand.

JUnit 5.4.0 is the first version of JUnit that has a native temporary
directory API [2]. By upgrading to JUnit 5.4.0, we can directly use
the org.junit.jupiter.api.io.TempDir API.
This reduces the complexity of implementing a temporary directory.

Let's upgrade to use JUnit 5.4.0.

[1] https://medium.com/@GalletVictor/migration-from-junit-4-to-junit-5-d8fe38644abe
[2] junit-team/junit5#1247
sijie123 added a commit to sijie123/CS2103-DeadlineManager that referenced this issue Apr 13, 2019
We write our tests using the JUnit 5.1.0 API. The JUnit 5.1.0 API
contains most features we require, such as assertTrue or assertThrows.

We have unit tests such as StorageManagerTest#prefsReadSave that
require writing to the filesystem. These tests need to make use of
temporary directories. This is so that
(1) we can begin with a clean, known state at the start of each test
and
(2) we can prevent our test output from polluting the user's file
system.

However, JUnit 5.1.0 does not support creating temporary directories
natively, so developers need to create a custom TemporaryDirectory
implementation or rely on JUnit-Pioneer library [1]. Both of these
solutions make it complicated to implement and for future developers
to understand.

JUnit 5.4.0 is the first version of JUnit that has a native temporary
directory API [2]. By upgrading to JUnit 5.4.0, we can directly use
the org.junit.jupiter.api.io.TempDir API.
This reduces the complexity of implementing a temporary directory.

Let's upgrade to use JUnit 5.4.0.

[1] https://medium.com/@GalletVictor/migration-from-junit-4-to-junit-5-d8fe38644abe
[2] junit-team/junit5#1247
sijie123 added a commit to sijie123/CS2103-DeadlineManager that referenced this issue Apr 13, 2019
We write our tests using the JUnit 5.1.0 API. The JUnit 5.1.0 API
contains most features we require, such as assertTrue or assertThrows.

We have unit tests such as StorageManagerTest#prefsReadSave that
require writing to the filesystem. These tests need to make use of
temporary directories. This is so that
(1) we can begin with a clean, known state at the start of each test
and
(2) we can prevent our test output from polluting the user's file
system.

However, JUnit 5.1.0 does not support creating temporary directories
natively, so developers need to create a custom TemporaryDirectory
implementation or rely on JUnit-Pioneer library [1]. Both of these
solutions make it complicated to implement and for future developers
to understand.

JUnit 5.4.0 is the first version of JUnit that has a native temporary
directory API [2]. By upgrading to JUnit 5.4.0, we can directly use
the org.junit.jupiter.api.io.TempDir API.
This reduces the complexity of implementing a temporary directory.

Let's upgrade to use JUnit 5.4.0.

[1] https://medium.com/@GalletVictor/migration-from-junit-4-to-junit-5-d8fe38644abe
[2] junit-team/junit5#1247
sijie123 added a commit to sijie123/CS2103-DeadlineManager that referenced this issue Apr 13, 2019
We write our tests using the JUnit 5.1.0 API. The JUnit 5.1.0 API
contains most features we require, such as assertTrue or assertThrows.

We have unit tests such as StorageManagerTest#prefsReadSave that
require writing to the filesystem. These tests need to make use of
temporary directories. This is so that
(1) we can begin with a clean, known state at the start of each test
and
(2) we can prevent our test output from polluting the user's file
system.

However, JUnit 5.1.0 does not support creating temporary directories
natively, so developers need to create a custom TemporaryDirectory
implementation or rely on JUnit-Pioneer library [1]. Both of these
solutions make it complicated to implement and for future developers
to understand.

JUnit 5.4.0 is the first version of JUnit that has a native temporary
directory API [2]. By upgrading to JUnit 5.4.0, we can directly use
the org.junit.jupiter.api.io.TempDir API.
This reduces the complexity of implementing a temporary directory.

Let's upgrade to use JUnit 5.4.0.

[1] https://medium.com/@GalletVictor/migration-from-junit-4-to-junit-5-d8fe38644abe
[2] junit-team/junit5#1247
sijie123 added a commit to sijie123/CS2103-DeadlineManager that referenced this issue Apr 13, 2019
We write our tests using the JUnit 5.1.0 API. The JUnit 5.1.0 API
contains most features we require, such as assertTrue or assertThrows.

We have unit tests such as StorageManagerTest#prefsReadSave that
require writing to the filesystem. These tests need to make use of
temporary directories. This is so that
(1) we can begin with a clean, known state at the start of each test
and
(2) we can prevent our test output from polluting the user's file
system.

However, JUnit 5.1.0 does not support creating temporary directories
natively, so developers need to create a custom TemporaryDirectory
implementation or rely on JUnit-Pioneer library [1]. Both of these
solutions make it complicated to implement and for future developers
to understand.

JUnit 5.4.0 is the first version of JUnit that has a native temporary
directory API [2]. By upgrading to JUnit 5.4.0, we can directly use
the org.junit.jupiter.api.io.TempDir API.
This reduces the complexity of implementing a temporary directory.

Let's upgrade to use JUnit 5.4.0.

[1] https://medium.com/@GalletVictor/migration-from-junit-4-to-junit-5-d8fe38644abe
[2] junit-team/junit5#1247
sijie123 added a commit to sijie123/CS2103-DeadlineManager that referenced this issue Apr 14, 2019
We write our tests using the JUnit 5.1.0 API. The JUnit 5.1.0 API
contains most features we require, such as assertTrue or assertThrows.

We have unit tests such as StorageManagerTest#prefsReadSave that
require writing to the filesystem. These tests need to make use of
temporary directories. This is so that
(1) we can begin with a clean, known state at the start of each test
and
(2) we can prevent our test output from polluting the user's file
system.

However, JUnit 5.1.0 does not support creating temporary directories
natively, so developers need to create a custom TemporaryDirectory
implementation or rely on JUnit-Pioneer library [1]. Both of these
solutions make it complicated to implement and for future developers
to understand.

JUnit 5.4.0 is the first version of JUnit that has a native temporary
directory API [2]. By upgrading to JUnit 5.4.0, we can directly use
the org.junit.jupiter.api.io.TempDir API.
This reduces the complexity of implementing a temporary directory.

Let's upgrade to use JUnit 5.4.0.

[1] https://medium.com/@GalletVictor/migration-from-junit-4-to-junit-5-d8fe38644abe
[2] junit-team/junit5#1247
sijie123 added a commit to sijie123/CS2103-DeadlineManager that referenced this issue Apr 14, 2019
We write our tests using the JUnit 5.1.0 API. The JUnit 5.1.0 API
contains most features we require, such as assertTrue or assertThrows.

We have unit tests such as StorageManagerTest#prefsReadSave that
require writing to the filesystem. These tests need to make use of
temporary directories. This is so that
(1) we can begin with a clean, known state at the start of each test
and
(2) we can prevent our test output from polluting the user's file
system.

However, JUnit 5.1.0 does not support creating temporary directories
natively, so developers need to create a custom TemporaryDirectory
implementation or rely on JUnit-Pioneer library [1]. Both of these
solutions make it complicated to implement and for future developers
to understand.

JUnit 5.4.0 is the first version of JUnit that has a native temporary
directory API [2]. By upgrading to JUnit 5.4.0, we can directly use
the org.junit.jupiter.api.io.TempDir API.
This reduces the complexity of implementing a temporary directory.

Let's upgrade to use JUnit 5.4.0.

[1] https://medium.com/@GalletVictor/migration-from-junit-4-to-junit-5-d8fe38644abe
[2] junit-team/junit5#1247
sijie123 added a commit to sijie123/CS2103-DeadlineManager that referenced this issue Apr 14, 2019
We write our tests using the JUnit 5.1.0 API. The JUnit 5.1.0 API
contains most features we require, such as assertTrue or assertThrows.

We have unit tests such as StorageManagerTest#prefsReadSave that
require writing to the filesystem. These tests need to make use of
temporary directories. This is so that
(1) we can begin with a clean, known state at the start of each test
and
(2) we can prevent our test output from polluting the user's file
system.

However, JUnit 5.1.0 does not support creating temporary directories
natively, so developers need to create a custom TemporaryDirectory
implementation or rely on JUnit-Pioneer library [1]. Both of these
solutions make it complicated to implement and for future developers
to understand.

JUnit 5.4.0 is the first version of JUnit that has a native temporary
directory API [2]. By upgrading to JUnit 5.4.0, we can directly use
the org.junit.jupiter.api.io.TempDir API.
This reduces the complexity of implementing a temporary directory.

Let's upgrade to use JUnit 5.4.0.

[1] https://medium.com/@GalletVictor/migration-from-junit-4-to-junit-5-d8fe38644abe
[2] junit-team/junit5#1247
sijie123 added a commit to sijie123/CS2103-DeadlineManager that referenced this issue Apr 25, 2019
We write our tests using the JUnit 5.1.0 API. The JUnit 5.1.0 API
contains most features we require, such as assertTrue or assertThrows.

We have unit tests such as StorageManagerTest#prefsReadSave that
require writing to the filesystem. These tests need to make use of
temporary directories. This is so that
(1) we can begin with a clean, known state at the start of each test
and
(2) we can prevent our test output from polluting the user's file
system.

However, JUnit 5.1.0 does not support creating temporary directories
natively, so developers need to create a custom TemporaryDirectory
implementation or rely on JUnit-Pioneer library [1]. Both of these
solutions make it complicated to implement and for future developers
to understand.

JUnit 5.4.0 is the first version of JUnit that has a native temporary
directory API [2]. By upgrading to JUnit 5.4.0, we can directly use
the org.junit.jupiter.api.io.TempDir API.
This reduces the complexity of implementing a temporary directory.

Let's upgrade to use JUnit 5.4.0.

[1] https://medium.com/@GalletVictor/migration-from-junit-4-to-junit-5-d8fe38644abe
[2] junit-team/junit5#1247
sijie123 added a commit to sijie123/CS2103-DeadlineManager that referenced this issue Apr 26, 2019
We write our tests using the JUnit 5.1.0 API. The JUnit 5.1.0 API
contains most features we require, such as assertTrue or assertThrows.

We have unit tests such as StorageManagerTest#prefsReadSave that
require writing to the filesystem. These tests need to make use of
temporary directories. This is so that
(1) we can begin with a clean, known state at the start of each test
and
(2) we can prevent our test output from polluting the user's file
system.

However, JUnit 5.1.0 does not support creating temporary directories
natively, so developers need to create a custom TemporaryDirectory
implementation or rely on JUnit-Pioneer library [1]. Both of these
solutions make it complicated to implement and for future developers
to understand.

JUnit 5.4.0 is the first version of JUnit that has a native temporary
directory API [2]. By upgrading to JUnit 5.4.0, we can directly use
the org.junit.jupiter.api.io.TempDir API.
This reduces the complexity of implementing a temporary directory.

Let's upgrade to use JUnit 5.4.0.

[1] https://medium.com/@GalletVictor/migration-from-junit-4-to-junit-5-d8fe38644abe
[2] junit-team/junit5#1247
sijie123 added a commit to sijie123/CS2103-DeadlineManager that referenced this issue Apr 26, 2019
We write our tests using the JUnit 5.1.0 API. The JUnit 5.1.0 API
contains most features we require, such as assertTrue or assertThrows.

We have unit tests such as StorageManagerTest#prefsReadSave that
require writing to the filesystem. These tests need to make use of
temporary directories. This is so that
(1) we can begin with a clean, known state at the start of each test
and
(2) we can prevent our test output from polluting the user's file
system.

However, JUnit 5.1.0 does not support creating temporary directories
natively, so developers need to create a custom TemporaryDirectory
implementation or rely on JUnit-Pioneer library [1]. Both of these
solutions make it complicated to implement and for future developers
to understand.

JUnit 5.4.0 is the first version of JUnit that has a native temporary
directory API [2]. By upgrading to JUnit 5.4.0, we can directly use
the org.junit.jupiter.api.io.TempDir API.
This reduces the complexity of implementing a temporary directory.

Let's upgrade to use JUnit 5.4.0.

[1] https://medium.com/@GalletVictor/migration-from-junit-4-to-junit-5-d8fe38644abe
[2] junit-team/junit5#1247
sijie123 added a commit to sijie123/CS2103-DeadlineManager that referenced this issue Apr 27, 2019
We write our tests using the JUnit 5.1.0 API. The JUnit 5.1.0 API
contains most features we require, such as assertTrue or assertThrows.

We have unit tests such as StorageManagerTest#prefsReadSave that
require writing to the filesystem. These tests need to make use of
temporary directories. This is so that
(1) we can begin with a clean, known state at the start of each test
and
(2) we can prevent our test output from polluting the user's file
system.

However, JUnit 5.1.0 does not support creating temporary directories
natively, so developers need to create a custom TemporaryDirectory
implementation or rely on JUnit-Pioneer library [1]. Both of these
solutions make it complicated to implement and for future developers
to understand.

JUnit 5.4.0 is the first version of JUnit that has a native temporary
directory API [2]. By upgrading to JUnit 5.4.0, we can directly use
the org.junit.jupiter.api.io.TempDir API.
This reduces the complexity of implementing a temporary directory.

Let's upgrade to use JUnit 5.4.0.

[1] https://medium.com/@GalletVictor/migration-from-junit-4-to-junit-5-d8fe38644abe
[2] junit-team/junit5#1247
sijie123 added a commit to sijie123/CS2103-DeadlineManager that referenced this issue Apr 28, 2019
We write our tests using the JUnit 5.1.0 API. The JUnit 5.1.0 API
contains most features we require, such as assertTrue or assertThrows.

We have unit tests such as StorageManagerTest#prefsReadSave that
require writing to the filesystem. These tests need to make use of
temporary directories. This is so that
(1) we can begin with a clean, known state at the start of each test
and
(2) we can prevent our test output from polluting the user's file
system.

However, JUnit 5.1.0 does not support creating temporary directories
natively, so developers need to create a custom TemporaryDirectory
implementation or rely on JUnit-Pioneer library [1]. Both of these
solutions make it complicated to implement and for future developers
to understand.

JUnit 5.4.0 is the first version of JUnit that has a native temporary
directory API [2]. By upgrading to JUnit 5.4.0, we can directly use
the org.junit.jupiter.api.io.TempDir API.
This reduces the complexity of implementing a temporary directory.

Let's upgrade to use JUnit 5.4.0.

[1] https://medium.com/@GalletVictor/migration-from-junit-4-to-junit-5-d8fe38644abe
[2] junit-team/junit5#1247
sijie123 added a commit to sijie123/CS2103-DeadlineManager that referenced this issue Apr 28, 2019
We write our tests using the JUnit 5.1.0 API. The JUnit 5.1.0 API
contains most features we require, such as assertTrue or assertThrows.

We have unit tests such as StorageManagerTest#prefsReadSave that
require writing to the filesystem. These tests need to make use of
temporary directories. This is so that
(1) we can begin with a clean, known state at the start of each test
and
(2) we can prevent our test output from polluting the user's file
system.

However, JUnit 5.1.0 does not support creating temporary directories
natively, so developers need to create a custom TemporaryDirectory
implementation or rely on JUnit-Pioneer library [1]. Both of these
solutions make it complicated to implement and for future developers
to understand.

JUnit 5.4.0 is the first version of JUnit that has a native temporary
directory API [2]. By upgrading to JUnit 5.4.0, we can directly use
the org.junit.jupiter.api.io.TempDir API.
This reduces the complexity of implementing a temporary directory.

Let's upgrade to use JUnit 5.4.0.

[1] https://medium.com/@GalletVictor/migration-from-junit-4-to-junit-5-d8fe38644abe
[2] junit-team/junit5#1247
sijie123 added a commit to sijie123/CS2103-DeadlineManager that referenced this issue Apr 28, 2019
We write our tests using the JUnit 5.1.0 API. The JUnit 5.1.0 API
contains most features we require, such as assertTrue or assertThrows.

We have unit tests such as StorageManagerTest#prefsReadSave that
require writing to the filesystem. These tests need to make use of
temporary directories. This is so that
(1) we can begin with a clean, known state at the start of each test
and
(2) we can prevent our test output from polluting the user's file
system.

However, JUnit 5.1.0 does not support creating temporary directories
natively, so developers need to create a custom TemporaryDirectory
implementation or rely on JUnit-Pioneer library [1]. Both of these
solutions make it complicated to implement and for future developers
to understand.

JUnit 5.4.0 is the first version of JUnit that has a native temporary
directory API [2]. By upgrading to JUnit 5.4.0, we can directly use
the org.junit.jupiter.api.io.TempDir API.
This reduces the complexity of implementing a temporary directory.

Let's upgrade to use JUnit 5.4.0.

[1] https://medium.com/@GalletVictor/migration-from-junit-4-to-junit-5-d8fe38644abe
[2] junit-team/junit5#1247
sijie123 added a commit to sijie123/CS2103-DeadlineManager that referenced this issue Apr 30, 2019
We write our tests using the JUnit 5.1.0 API. The JUnit 5.1.0 API
contains most features we require, such as assertTrue or assertThrows.

We have unit tests such as StorageManagerTest#prefsReadSave that
require writing to the filesystem. These tests need to make use of
temporary directories. This is so that
(1) we can begin with a clean, known state at the start of each test
and
(2) we can prevent our test output from polluting the user's file
system.

However, JUnit 5.1.0 does not support creating temporary directories
natively, so developers need to create a custom TemporaryDirectory
implementation or rely on JUnit-Pioneer library [1]. Both of these
solutions make it complicated to implement and for future developers
to understand.

JUnit 5.4.0 is the first version of JUnit that has a native temporary
directory API [2]. By upgrading to JUnit 5.4.0, we can directly use
the org.junit.jupiter.api.io.TempDir API.
This reduces the complexity of implementing a temporary directory.

Let's upgrade to use JUnit 5.4.0.

[1] https://medium.com/@GalletVictor/migration-from-junit-4-to-junit-5-d8fe38644abe
[2] junit-team/junit5#1247
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
9 participants