Remove temp dir extension and use native junit annotation

This commit is contained in:
René Pfeuffer
2020-05-23 19:06:02 +02:00
committed by René Pfeuffer
parent 6cde2a90cc
commit 7636f1e845
29 changed files with 143 additions and 193 deletions

View File

@@ -26,7 +26,7 @@ package sonia.scm;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junitpioneer.jupiter.TempDirectory;
import org.junit.jupiter.api.io.TempDir;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
@@ -36,14 +36,14 @@ import java.util.Properties;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.when;
@ExtendWith({MockitoExtension.class, TempDirectory.class})
@ExtendWith({MockitoExtension.class})
class ScmLogFilePropertyDefinerTest {
@Mock
private SCMContextProvider context;
@Test
void shouldReturnPath(@TempDirectory.TempDir Path tempDir) {
void shouldReturnPath(@TempDir Path tempDir) {
when(context.getBaseDirectory()).thenReturn(tempDir.toFile());
ScmLogFilePropertyDefiner definer = builder().create();
@@ -52,7 +52,7 @@ class ScmLogFilePropertyDefinerTest {
}
@Test
void shouldReturnOsxPath(@TempDirectory.TempDir Path tempDir) {
void shouldReturnOsxPath(@TempDir Path tempDir) {
ScmLogFilePropertyDefiner definer = builder()
.withOs("Mac OS X")
.withUserHome(tempDir.toAbsolutePath().toString())