+
Впізнай країну за прапором
+
+
Перевір свої знання географії!
+
Цей тест покаже, наскільки добре ти розпізнаєш прапори країн світу.
+ У кожному запитанні буде зображення прапора — обери правильну назву країни з кількох варіантів.
+
Результати з’являться наприкінці тесту.
+
+
+
+
+
diff --git a/src/main/webapp/static/styles_logic.css b/src/main/webapp/static/styles_logic.css
new file mode 100644
index 0000000..d3cd550
--- /dev/null
+++ b/src/main/webapp/static/styles_logic.css
@@ -0,0 +1,33 @@
+body, html {
+ height: 100%;
+ margin: 0;
+}
+.full-screen-color {
+ min-height: 100vh;
+ background-color: #81674d;
+ color: white;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ padding: 2rem;
+ font-size: 1.25rem;
+}
+img.object-fit-fill.border.rounded {
+ object-fit: cover;
+ border: 2px solid #dee2e6;
+ border-radius: 12px;
+ width: auto;
+ max-width: 300px;
+ height: auto;
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
+}
+h1 {
+ font-size: 2.5rem;
+}
+.form-check-label {
+ font-size: 1.2rem;
+}
+.btn {
+ font-size: 1.2rem;
+ padding: 0.6rem 2rem;
+}
\ No newline at end of file
diff --git a/src/main/webapp/static/styles_result.css b/src/main/webapp/static/styles_result.css
new file mode 100644
index 0000000..d2527ff
--- /dev/null
+++ b/src/main/webapp/static/styles_result.css
@@ -0,0 +1,23 @@
+.full-screen-color {
+ min-height: 100vh;
+ background-color: #81674d;
+ color: white;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ padding: 2rem;
+ font-size: 1.25rem;
+}
+img.object-fit-fill.border.rounded {
+ object-fit: cover;
+ border: 2px solid #dee2e6;
+ border-radius: 12px;
+ width: auto;
+ max-width: 300px;
+ height: auto;
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
+}
+.btn {
+ font-size: 1.2rem;
+ padding: 0.6rem 2rem;
+}
\ No newline at end of file
diff --git a/src/main/webapp/static/styles_start.css b/src/main/webapp/static/styles_start.css
new file mode 100644
index 0000000..69a357c
--- /dev/null
+++ b/src/main/webapp/static/styles_start.css
@@ -0,0 +1,24 @@
+body, html {
+ height: 100%;
+ margin: 0;
+}
+.full-screen-color {
+ min-height: 100vh;
+ background-color: #81674d;
+ color: white;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ text-align: center;
+ padding: 2rem;
+}
+h1 {
+ font-size: 3rem;
+}
+p {
+ font-size: 1.5rem;
+}
+.btn {
+ font-size: 1.2rem;
+ padding: 0.6rem 2rem;
+}
\ No newline at end of file
diff --git a/src/test/java/quiz/command/RedoCommandTest.java b/src/test/java/quiz/command/RedoCommandTest.java
new file mode 100644
index 0000000..0abd95a
--- /dev/null
+++ b/src/test/java/quiz/command/RedoCommandTest.java
@@ -0,0 +1,40 @@
+package quiz.command;
+
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import quiz.history.QuestionsHistoryManager;
+
+import static org.junit.jupiter.api.Assertions.*;
+import static org.mockito.Mockito.*;
+
+class RedoCommandTest {
+
+ private QuestionsHistoryManager mockHistoryManager;
+ private RedoCommand redoCommand;
+
+ @BeforeEach
+ void setUp() {
+ mockHistoryManager = mock(QuestionsHistoryManager.class);
+ redoCommand = new RedoCommand(mockHistoryManager);
+ }
+
+ @Test
+ void testConstructor_shouldInitializeWithValidManager() {
+ assertNotNull(redoCommand, "RedoCommand should be properly initialized");
+ }
+
+ @Test
+ void testConstructor_withNullManager_shouldThrowException() {
+ IllegalArgumentException exception = assertThrows(IllegalArgumentException.class, () -> {
+ new RedoCommand(null);
+ });
+ assertEquals("Memento cannot be null", exception.getMessage(), "Should throw exception for null memento");
+ }
+
+ @Test
+ void testExecute_shouldCallRestore() {
+ redoCommand.execute();
+
+ verify(mockHistoryManager, times(1)).backup();
+ }
+}
diff --git a/src/test/java/quiz/command/UndoCommandTest.java b/src/test/java/quiz/command/UndoCommandTest.java
new file mode 100644
index 0000000..72422df
--- /dev/null
+++ b/src/test/java/quiz/command/UndoCommandTest.java
@@ -0,0 +1,40 @@
+package quiz.command;
+
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import quiz.history.QuestionsHistoryManager;
+
+import static org.junit.jupiter.api.Assertions.*;
+import static org.mockito.Mockito.*;
+
+class UndoCommandTest {
+
+ private QuestionsHistoryManager mockHistoryManager;
+ private UndoCommand undoCommand;
+
+ @BeforeEach
+ void setUp() {
+ mockHistoryManager = mock(QuestionsHistoryManager.class);
+ undoCommand = new UndoCommand(mockHistoryManager);
+ }
+
+ @Test
+ void testConstructor_shouldInitializeWithValidManager() {
+ assertNotNull(undoCommand, "UndoCommand should be properly initialized");
+ }
+
+ @Test
+ void testConstructor_withNullManager_shouldThrowException() {
+ IllegalArgumentException exception = assertThrows(IllegalArgumentException.class, () -> {
+ new UndoCommand(null);
+ });
+ assertEquals("Memento cannot be null", exception.getMessage(), "Should throw exception for null memento");
+ }
+
+ @Test
+ void testExecute_shouldCallBackup() {
+ undoCommand.execute();
+
+ verify(mockHistoryManager, times(1)).restore();
+ }
+}
diff --git a/src/test/java/quiz/deserializer/DeserializerBaseTest.java b/src/test/java/quiz/deserializer/DeserializerBaseTest.java
new file mode 100644
index 0000000..f06e8ef
--- /dev/null
+++ b/src/test/java/quiz/deserializer/DeserializerBaseTest.java
@@ -0,0 +1,155 @@
+package quiz.deserializer;
+
+import org.junit.jupiter.api.Test;
+import org.mockito.MockedStatic;
+
+import java.io.InputStream;
+import java.nio.file.Files;
+import java.nio.file.Path;
+
+import static org.junit.jupiter.api.Assertions.*;
+import static org.mockito.Mockito.*;
+
+class DeserializerBaseTest {
+
+ private