diff options
Diffstat (limited to 'core/modules')
| -rw-r--r-- | core/modules/qemu/runvirt-plugin-qemu/pom.xml | 8 | ||||
| -rw-r--r-- | core/modules/qemu/runvirt-plugin-qemu/src/test/java/org/openslx/runvirt/plugin/qemu/AppTest.java | 87 |
2 files changed, 1 insertions, 94 deletions
diff --git a/core/modules/qemu/runvirt-plugin-qemu/pom.xml b/core/modules/qemu/runvirt-plugin-qemu/pom.xml index 1d64e065..5cdf3f93 100644 --- a/core/modules/qemu/runvirt-plugin-qemu/pom.xml +++ b/core/modules/qemu/runvirt-plugin-qemu/pom.xml @@ -92,12 +92,6 @@ <scope>compile</scope> </dependency> <dependency> - <groupId>com.ginsberg</groupId> - <artifactId>junit5-system-exit</artifactId> - <version>[1.0,2.0)</version> - <scope>test</scope> - </dependency> - <dependency> <groupId>org.libvirt</groupId> <artifactId>libvirt</artifactId> <version>[0.5,1.0)</version> @@ -163,7 +157,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> - <version>3.0.0-M5</version> + <version>3.5.4</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> diff --git a/core/modules/qemu/runvirt-plugin-qemu/src/test/java/org/openslx/runvirt/plugin/qemu/AppTest.java b/core/modules/qemu/runvirt-plugin-qemu/src/test/java/org/openslx/runvirt/plugin/qemu/AppTest.java deleted file mode 100644 index 5bcab1a7..00000000 --- a/core/modules/qemu/runvirt-plugin-qemu/src/test/java/org/openslx/runvirt/plugin/qemu/AppTest.java +++ /dev/null @@ -1,87 +0,0 @@ -package org.openslx.runvirt.plugin.qemu; - -import java.io.ByteArrayOutputStream; -import java.io.PrintStream; - -import org.apache.logging.log4j.Level; -import org.apache.logging.log4j.core.config.Configurator; -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.DisplayName; -import org.junit.jupiter.api.Nested; -import org.junit.jupiter.api.Test; -import org.openslx.runvirt.plugin.qemu.cmdln.CommandLineArgs.CmdLnOption; - -import com.ginsberg.junit.exit.ExpectSystemExitWithStatus; - -public class AppTest -{ - - @BeforeAll - public static void setUp() - { - // disable logging with log4j - Configurator.setRootLevel( Level.OFF ); - } - - @Nested - public class CmdLnTest - { - private final ByteArrayOutputStream out = new ByteArrayOutputStream(); - private final ByteArrayOutputStream err = new ByteArrayOutputStream(); - - private void setUp() - { - // redirect output and error stream content - System.setOut( new PrintStream( this.out ) ); - System.setErr( new PrintStream( this.err ) ); - } - - @Test - @DisplayName( "Test exit status of application invoked with correct 'help' command line option (short version)" ) - @ExpectSystemExitWithStatus( 0 ) - public void testCmdLnOptionHelpShortCorrectExit() - { - String[] argsShortHelpOptionCorrect = { "-" + CmdLnOption.HELP.getShortOption() }; - - this.setUp(); - - App.main( argsShortHelpOptionCorrect ); - } - - @Test - @DisplayName( "Test exit status of application invoked with correct 'help' command line option (long version)" ) - @ExpectSystemExitWithStatus( 0 ) - public void testCmdLnOptionHelpLongCorrectExit() - { - String[] argsLongHelpOptionCorrect = { "--" + CmdLnOption.HELP.getLongOption() }; - - this.setUp(); - - App.main( argsLongHelpOptionCorrect ); - } - - @Test - @DisplayName( "Test exit status of application invoked with incorrect 'help' command line option (short version)" ) - @ExpectSystemExitWithStatus( 1 ) - public void testCmdLnOptionHelpShortIncorrectExit() - { - String[] argsShortHelpOptionCorrect = { "---" + CmdLnOption.HELP.getShortOption() }; - - this.setUp(); - - App.main( argsShortHelpOptionCorrect ); - } - - @Test - @DisplayName( "Test exit status of application invoked with incorrect 'help' command line option (long version)" ) - @ExpectSystemExitWithStatus( 1 ) - public void testCmdLnOptionHelpLongIncorrectExit() - { - String[] argsLongHelpOptionCorrect = { "---" + CmdLnOption.HELP.getLongOption() }; - - this.setUp(); - - App.main( argsLongHelpOptionCorrect ); - } - } -} |
