mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-09-03 17:52:30 +02:00
Update FileInfoTest.java
This commit is contained in:
parent
110c6cef8d
commit
747b67e4ec
@ -5,6 +5,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.jupiter.params.ParameterizedTest;
|
import org.junit.jupiter.params.ParameterizedTest;
|
||||||
import org.junit.jupiter.params.provider.CsvSource;
|
import org.junit.jupiter.params.provider.CsvSource;
|
||||||
|
|
||||||
@ -37,7 +38,7 @@ public class FileInfoTest {
|
|||||||
assertEquals(expectedFormattedSize, fileInfo.getFormattedFileSize());
|
assertEquals(expectedFormattedSize, fileInfo.getFormattedFileSize());
|
||||||
}
|
}
|
||||||
|
|
||||||
@org.junit.jupiter.api.Test
|
@Test
|
||||||
void testGetFilePathAsPath() {
|
void testGetFilePathAsPath() {
|
||||||
FileInfo fileInfo =
|
FileInfo fileInfo =
|
||||||
new FileInfo(
|
new FileInfo(
|
||||||
@ -51,7 +52,7 @@ public class FileInfoTest {
|
|||||||
fileInfo.getFilePathAsPath().toString());
|
fileInfo.getFilePathAsPath().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@org.junit.jupiter.api.Test
|
@Test
|
||||||
void testGetFormattedModificationDate() {
|
void testGetFormattedModificationDate() {
|
||||||
LocalDateTime modDate = LocalDateTime.of(2024, 6, 1, 15, 30, 45);
|
LocalDateTime modDate = LocalDateTime.of(2024, 6, 1, 15, 30, 45);
|
||||||
FileInfo fileInfo =
|
FileInfo fileInfo =
|
||||||
@ -64,7 +65,7 @@ public class FileInfoTest {
|
|||||||
assertEquals("2024-06-01 15:30:45", fileInfo.getFormattedModificationDate());
|
assertEquals("2024-06-01 15:30:45", fileInfo.getFormattedModificationDate());
|
||||||
}
|
}
|
||||||
|
|
||||||
@org.junit.jupiter.api.Test
|
@Test
|
||||||
void testGetFormattedCreationDate() {
|
void testGetFormattedCreationDate() {
|
||||||
LocalDateTime creationDate = LocalDateTime.of(2023, 12, 25, 8, 15, 0);
|
LocalDateTime creationDate = LocalDateTime.of(2023, 12, 25, 8, 15, 0);
|
||||||
FileInfo fileInfo =
|
FileInfo fileInfo =
|
||||||
@ -77,7 +78,7 @@ public class FileInfoTest {
|
|||||||
assertEquals("2023-12-25 08:15:00", fileInfo.getFormattedCreationDate());
|
assertEquals("2023-12-25 08:15:00", fileInfo.getFormattedCreationDate());
|
||||||
}
|
}
|
||||||
|
|
||||||
@org.junit.jupiter.api.Test
|
@Test
|
||||||
void testGettersAndSetters() {
|
void testGettersAndSetters() {
|
||||||
LocalDateTime now = LocalDateTime.now();
|
LocalDateTime now = LocalDateTime.now();
|
||||||
FileInfo fileInfo =
|
FileInfo fileInfo =
|
||||||
|
Loading…
Reference in New Issue
Block a user