/
OlegPovarenkov
/
SystemAdministratorHelper
Обзор
Документация
Войти
/
OlegPovarenkov
/
SystemAdministratorHelper
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
src/test/java/Archiver/ArchiverTest.java
54 строки
2 KB
OlegPIE22BO
Initial commit
16 июн 2026, 19:26
16 июн 2026, 19:26
d2625e7
Код
Авторство
О чём код?
/* * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template */ package Archiver; import com.fasterxml.jackson.databind.ObjectMapper; import com.opsm16.systemadministratorhelper.Archiever.Archiver; import com.opsm16.systemadministratorhelper.Archiever.FileNote; import java.io.File; import java.io.IOException; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestInstance; /** * * @author afonyaopsm16 */ @TestInstance(TestInstance.Lifecycle.PER_CLASS) public class ArchiverTest { final ObjectMapper objectMapper = new ObjectMapper(); @BeforeAll public void init() throws IOException{ //make original files, delete copies if exist // final FileNote fileNoteA = new FileNote(0, "/home/test/TestArchiveFile.txt"); // final FileNote fileNoteB = new FileNote(1, "/home/test/TestServerArhiveFile.txt"); // final FileNote[] archiveArray = new FileNote[] {fileNoteA, fileNoteB}; // final File file = new File("ARCHIVE.json"); // if (!file.exists()) { // file.createNewFile(); // } // objectMapper.writerWithDefaultPrettyPrinter().writeValue(file, archiveArray); } @Test public void testArchive() throws IOException{ Archiver archiver = new Archiver(); archiver.archive(); } @Test public void playground() { System.out.println(Integer.valueOf("")); } @AfterAll public void deinit() { } }