From 44eb5b8fe3a538bd5e1af8c2612be023e426a1b9 Mon Sep 17 00:00:00 2001 From: Marc Dimmerling Date: Fri, 9 Feb 2024 17:58:51 +0100 Subject: [PATCH] Test8 --- src/test/java/NotizbuchTest.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/test/java/NotizbuchTest.java b/src/test/java/NotizbuchTest.java index 4cc9916..85bb613 100644 --- a/src/test/java/NotizbuchTest.java +++ b/src/test/java/NotizbuchTest.java @@ -81,4 +81,15 @@ class NotizbuchTest { assertEquals("Erste Zeile\nZweite Zeile\nDritte Zeile\n", notizbuch.textArea.getText()); } + @Test + public void testSpeichernUndLadenMitLeererZeile() { + Notizbuch notizbuch = new Notizbuch(); + notizbuch.textArea.setText("\n"); + + notizbuch.saveNote(); + + notizbuch.loadNote(); + + assertEquals("\n", notizbuch.textArea.getText()); + } }