aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/musichub/util/LogHandlerTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/musichub/util/LogHandlerTest.java')
-rw-r--r--src/test/java/musichub/util/LogHandlerTest.java22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/test/java/musichub/util/LogHandlerTest.java b/src/test/java/musichub/util/LogHandlerTest.java
index 17b47f6..ab8e160 100644
--- a/src/test/java/musichub/util/LogHandlerTest.java
+++ b/src/test/java/musichub/util/LogHandlerTest.java
@@ -12,30 +12,30 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
public class LogHandlerTest {
@Test
- void testWrite() {
+ void testLogHandlerClass() {
try {
- write("JUnit test", "INFO");
- } catch (IOException e) {
- e.printStackTrace();
+ LogHandler logHandlerClass = new LogHandler();
+ } catch (Error e) {
+ assertTrue(e instanceof AssertionError);
+ assertEquals("You just can't instantiate this class.", e.getMessage());
}
}
@Test
- void testRead() {
+ void testWrite() {
try {
- read();
+ write("JUnit test", "TEST");
} catch (IOException e) {
e.printStackTrace();
}
}
@Test
- void testLogHandlerClass() {
+ void testRead() {
try {
- LogHandler logHandlerClass = new LogHandler();
- } catch (Error ex) {
- assertTrue(ex instanceof AssertionError);
- assertEquals("You just can't instantiate this class.", ex.getMessage());
+ read();
+ } catch (IOException e) {
+ e.printStackTrace();
}
}
}