From 9600a69b1e20419524c1661eea5cc21965a9c3c5 Mon Sep 17 00:00:00 2001 From: Robert Volkmann <20912167+robertvolkmann@users.noreply.github.com> Date: Thu, 1 Dec 2022 17:38:52 +0100 Subject: [PATCH] dependencies: make acyclic-visitor compatible with Java 11 (#2359) --- acyclic-visitor/pom.xml | 12 --- .../ConfigureForDosVisitorTest.java | 80 ------------------- .../ConfigureForUnixVisitorTest.java | 65 --------------- 3 files changed, 157 deletions(-) delete mode 100644 acyclic-visitor/src/test/java/com/iluwatar/acyclicvisitor/ConfigureForDosVisitorTest.java delete mode 100644 acyclic-visitor/src/test/java/com/iluwatar/acyclicvisitor/ConfigureForUnixVisitorTest.java diff --git a/acyclic-visitor/pom.xml b/acyclic-visitor/pom.xml index 34f16caa06ef..52604048e127 100644 --- a/acyclic-visitor/pom.xml +++ b/acyclic-visitor/pom.xml @@ -33,19 +33,7 @@ 1.26.0-SNAPSHOT acyclic-visitor - - UTF-8 - 1.8 - 1.8 - - - - uk.org.lidalia - slf4j-test - 1.2.0 - test - org.junit.jupiter junit-jupiter-engine diff --git a/acyclic-visitor/src/test/java/com/iluwatar/acyclicvisitor/ConfigureForDosVisitorTest.java b/acyclic-visitor/src/test/java/com/iluwatar/acyclicvisitor/ConfigureForDosVisitorTest.java deleted file mode 100644 index c6aec8bef971..000000000000 --- a/acyclic-visitor/src/test/java/com/iluwatar/acyclicvisitor/ConfigureForDosVisitorTest.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * This project is licensed under the MIT license. Module model-view-viewmodel is using ZK framework licensed under LGPL (see lgpl-3.0.txt). - * - * The MIT License - * Copyright © 2014-2022 Ilkka Seppälä - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package com.iluwatar.acyclicvisitor; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static uk.org.lidalia.slf4jext.Level.INFO; - -import com.google.common.collect.ImmutableList; -import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import uk.org.lidalia.slf4jtest.LoggingEvent; -import uk.org.lidalia.slf4jtest.TestLogger; -import uk.org.lidalia.slf4jtest.TestLoggerFactory; - -/** - * ConfigureForDosVisitor test class - */ -class ConfigureForDosVisitorTest { - - private final TestLogger logger = TestLoggerFactory.getTestLogger(ConfigureForDosVisitor.class); - - @Test - void testVisitForZoom() { - var conDos = new ConfigureForDosVisitor(); - var zoom = new Zoom(); - - conDos.visit(zoom); - - ImmutableList loggingEvents = logger.getLoggingEvents(); - assertEquals(1, loggingEvents.size()); - for (LoggingEvent loggingEvent : loggingEvents) { - assertEquals(INFO, loggingEvent.getLevel()); - assertEquals(zoom + " used with Dos configurator.", loggingEvent.getMessage()); - } - } - - @Test - void testVisitForHayes() { - var conDos = new ConfigureForDosVisitor(); - var hayes = new Hayes(); - - conDos.visit(hayes); - - ImmutableList loggingEvents = logger.getLoggingEvents(); - assertEquals(1, loggingEvents.size()); - for (LoggingEvent loggingEvent : loggingEvents) { - assertEquals(INFO, loggingEvent.getLevel()); - assertEquals(hayes + " used with Dos configurator.", loggingEvent.getMessage()); - } - } - - @BeforeEach - @AfterEach - void clearLoggers() { - TestLoggerFactory.clear(); - } -} diff --git a/acyclic-visitor/src/test/java/com/iluwatar/acyclicvisitor/ConfigureForUnixVisitorTest.java b/acyclic-visitor/src/test/java/com/iluwatar/acyclicvisitor/ConfigureForUnixVisitorTest.java deleted file mode 100644 index 587b82911f81..000000000000 --- a/acyclic-visitor/src/test/java/com/iluwatar/acyclicvisitor/ConfigureForUnixVisitorTest.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * This project is licensed under the MIT license. Module model-view-viewmodel is using ZK framework licensed under LGPL (see lgpl-3.0.txt). - * - * The MIT License - * Copyright © 2014-2022 Ilkka Seppälä - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package com.iluwatar.acyclicvisitor; - -import com.google.common.collect.ImmutableList; -import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import uk.org.lidalia.slf4jtest.LoggingEvent; -import uk.org.lidalia.slf4jtest.TestLogger; -import uk.org.lidalia.slf4jtest.TestLoggerFactory; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static uk.org.lidalia.slf4jext.Level.INFO; - -/** - * ConfigureForUnixVisitor test class - */ -class ConfigureForUnixVisitorTest { - - private static final TestLogger LOGGER = TestLoggerFactory.getTestLogger(ConfigureForUnixVisitor.class); - - @BeforeEach - @AfterEach - void clearLoggers() { - TestLoggerFactory.clear(); - } - - @Test - void testVisitForZoom() { - var conUnix = new ConfigureForUnixVisitor(); - var zoom = new Zoom(); - - conUnix.visit(zoom); - - ImmutableList loggingEvents = LOGGER.getLoggingEvents(); - assertEquals(1, loggingEvents.size()); - for (LoggingEvent loggingEvent : loggingEvents) { - assertEquals(INFO, loggingEvent.getLevel()); - assertEquals(zoom + " used with Unix configurator.", loggingEvent.getMessage()); - } - } -}