diff --git a/Doc/Sd1/arrays.xml b/Doc/Sd1/arrays.xml index bce6e81125b646daed5b158a4060a521aaf215fe..9241282c29722fb27cf1c5ff83d461898e14f6fb 100644 --- a/Doc/Sd1/arrays.xml +++ b/Doc/Sd1/arrays.xml @@ -1380,7 +1380,7 @@ final int[] sortedValues = Arrays.copyOf(values, values.length); <para>Like in the previous exercise Junit tests are being prepared but masked by an <interfacename - xlink:href="http://junit.sourceforge.net/javadoc/org/junit/Ignore.html">@Ignore</interfacename> + xlink:href="https://junit.org/junit5/docs/current/api/org/junit/jupiter/api/Disabled.html">@Disabled</interfacename> annotation.</para> <para>This skeleton project contains:</para> @@ -1402,8 +1402,7 @@ final int[] sortedValues = Arrays.copyOf(values, values.length); <listitem> <para>Like in the previous exercise the Junit tests are - being masked by an <interfacename - xlink:href="http://junit.sourceforge.net/javadoc/org/junit/Ignore.html">@Ignore</interfacename> + being masked by an <interfacename xlink:href="https://junit.org/junit5/docs/current/api/org/junit/jupiter/api/Disabled.html">@Disabled</interfacename> annotation. After successful implementation they should be enabled for test activation.</para> </listitem> @@ -1778,12 +1777,10 @@ Enter value #1 of 4: 1 <para>All tests would currently fail. Therefore the test class <classname>de.hdm_stuttgart.mi.sda1.console_sum.AppTest</classname> - is being masked by an <interfacename - xlink:href="http://junit.sourceforge.net/javadoc/org/junit/Ignore.html">@Ignore</interfacename> - annotation:</para> + is being masked by an <interfacename xlink:href="https://junit.org/junit5/docs/current/api/org/junit/jupiter/api/Disabled.html">@Disabled</interfacename> annotation:</para> <programlisting language="java">... -<emphasis role="bold" xlink:href="http://junit.sourceforge.net/javadoc/org/junit/Ignore.html">@Ignore</emphasis> +<emphasis role="bold" xlink:href="https://junit.org/junit5/docs/current/api/org/junit/jupiter/api/Disabled.html">@Disabled</emphasis> public class AppTest { /** * empty list @@ -1797,9 +1794,7 @@ public class AppTest { linkend="glo_IDE"/> and complete its implementation of <methodname>de.hdm_stuttgart.mi.sda1.console_sum.App.prettifyOutput(int[] values)</methodname> until all <xref linkend="glo_Junit"/> - tests do succeed. Removing the <interfacename - xlink:href="http://junit.sourceforge.net/javadoc/org/junit/Ignore.html">@Ignore</interfacename> - line will allow for testing your implementation.</para> + tests do succeed. Removing the <interfacename xlink:href="https://junit.org/junit5/docs/current/api/org/junit/jupiter/api/Disabled.html">@Disabled</interfacename> line will allow for testing your implementation.</para> </listitem> </itemizedlist> </tip> diff --git a/Doc/Sd1/deployment.xml b/Doc/Sd1/deployment.xml index 9e8f30224d8fd611db36bfa588ff39a90b4c2c1b..56a85becbb7768d2734a2b3193acb3aea956c386 100644 --- a/Doc/Sd1/deployment.xml +++ b/Doc/Sd1/deployment.xml @@ -30,16 +30,14 @@ <question> <para>The following Maven project contains a series of yet unimplemented methods and corresponding tests currently being - excluded by an <interfacename - xlink:href="http://junit.sourceforge.net/javadoc/org/junit/Ignore.html">@Ignore</interfacename> - annotation:</para> + excluded by an <interfacename xlink:href="https://junit.org/junit5/docs/current/api/org/junit/jupiter/api/Disabled.html">@Disabled</interfacename> annotation:</para> <annotation role="make"> <para role="eclipse">Sd1/Array/arraycalcExercise</para> </annotation> <programlisting language="java">... -<emphasis role="bold">@Ignore // Remove me to enable testing your application</emphasis> +<emphasis role="bold">@Disabled // Remove me to enable testing your application</emphasis> @SuppressWarnings("javadoc") public class ArrayMethodTest { diff --git a/Doc/Sd1/objectsClasses.xml b/Doc/Sd1/objectsClasses.xml index 0587d2c8f17d7be51048ae673565619fee967396..260780e0bbd8e91d498e52fd312322153032c80a 100644 --- a/Doc/Sd1/objectsClasses.xml +++ b/Doc/Sd1/objectsClasses.xml @@ -4143,23 +4143,19 @@ long sum = (long)a + b;</programlisting> <para>This Maven archive does include a <xref linkend="glo_Junit"/> test currently being disabled by an - <interfacename - xlink:href="http://junit.sourceforge.net/javadoc/org/junit/Ignore.html">@Ignore</interfacename> - directive:</para> + <interfacename xlink:href="https://junit.org/junit5/docs/current/api/org/junit/jupiter/api/Disabled.html">@Disabled</interfacename> directive:</para> <programlisting language="java">public class FractionTest { /** * Sums and products of fractions */ - <emphasis role="bold">@Ignore // Remove me after completing your implementation</emphasis> + <emphasis role="bold">@Disabled // Remove me after completing your implementation</emphasis> @Test public void testAdditionMultiply() {</programlisting> <para>The current skeleton will yield a NullPointerException on test execution. After completing your implementation remove - this <interfacename - xlink:href="http://junit.sourceforge.net/javadoc/org/junit/Ignore.html">@Ignore</interfacename> - directive allowing for test execution.</para> + this <interfacename xlink:href="https://junit.org/junit5/docs/current/api/org/junit/jupiter/api/Disabled.html">@Disabled</interfacename> directive allowing for test execution.</para> </question> <answer> diff --git a/P/Sd1/Array/Distinct/.gitignore b/P/Sd1/Array/Distinct/.gitignore index a1c3ab4d08c0f9f91918f21c730272a4711885e8..29bd96aed767721dbc3f2af36b627aadeb5e6842 100644 --- a/P/Sd1/Array/Distinct/.gitignore +++ b/P/Sd1/Array/Distinct/.gitignore @@ -2,3 +2,4 @@ /.settings/ .classpath .project +.idea/ diff --git a/P/Sd1/Array/Distinct/pom.xml b/P/Sd1/Array/Distinct/pom.xml index 60666ec29559291497fb5ff28f4c2f95340fb908..09f2f2f177147a899d155517f4db21b36a83f98f 100644 --- a/P/Sd1/Array/Distinct/pom.xml +++ b/P/Sd1/Array/Distinct/pom.xml @@ -1,80 +1,55 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <groupId>de.hdm_stuttgart.mi.sd1</groupId> - <artifactId>arraymethods</artifactId> - <version>1.0-SNAPSHOT</version> - <packaging>jar</packaging> - - <name>arraymethods</name> - - <url>https://freedocs.mi.hdm-stuttgart.de/sd1SectToolsOfTheTrade2.html</url> - - <properties> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - </properties> - - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.logging.log4j</groupId> - <artifactId>log4j-core</artifactId> - <version>2.9.1</version> - </dependency> - - </dependencies> - - <build> - <plugins> - - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>3.7.0</version> - <configuration> - <source>1.8</source> - <target>1.8</target> - </configuration> - </plugin> - - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-javadoc-plugin</artifactId> - <version>2.10.4</version> - <configuration /> - </plugin> - - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-shade-plugin</artifactId> - <version>3.1.0</version> - <configuration> - <transformers> - <transformer - implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> - <manifestEntries> - <Main-Class>de.hdm_stuttgart.mi.sd1.App</Main-Class> - </manifestEntries> - </transformer> - </transformers> - </configuration> - <executions> - <execution> - <phase>package</phase> - <goals> - <goal>shade</goal> - </goals> - </execution> - </executions> - </plugin> - - </plugins> - </build> -</project> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>de.hdm_stuttgart.mi.sd1</groupId> + <artifactId>arraymethods</artifactId> + <version>1.0</version> + + <name>arraymethods</name> + + <url>https://freedocs.mi.hdm-stuttgart.de/sd1SectToolsOfTheTrade2.html</url> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> + + <dependencies> + <dependency> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter-api</artifactId> + <version>5.1.0</version> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-core</artifactId> + <version>2.11.0</version> + </dependency> + + </dependencies> + + <build> + <plugins> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.7.0</version> + <configuration> + <source>1.8</source> + <target>1.8</target> + </configuration> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <version>3.0.0</version> + <configuration/> + </plugin> + + </plugins> + </build> +</project> \ No newline at end of file diff --git a/P/Sd1/Array/Distinct/src/main/java/de/hdm_stuttgart/mi/sd1/App.java b/P/Sd1/Array/Distinct/src/main/java/de/hdm_stuttgart/mi/sd1/App.java deleted file mode 100644 index c6cc15ef4597ad0f7002fbe39cb3a4dd8b62f92a..0000000000000000000000000000000000000000 --- a/P/Sd1/Array/Distinct/src/main/java/de/hdm_stuttgart/mi/sd1/App.java +++ /dev/null @@ -1,29 +0,0 @@ -package de.hdm_stuttgart.mi.sd1; - -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; - - -/** - * A simple http://logging.apache.org/log4j/2.x demo, - * see file resources/log4j2.xml for configuration options - * and A1.log containing debugging output. - */ - -public class App { - private static Logger log = LogManager.getLogger(App.class); - - /** - * Your application's main entry point. - * - * @param args Yet unused - */ - public static void main( String[] args ) { - System.out.println( "Hello World!" ); - - log.debug("With respect to logging you may want to configure file "); - log.debug("'src/main/resources/log4j2.xml' to suit your needs."); - log.debug("This config file 'log4j2.xml' will result in 'A1.log'"); - log.debug("file containing logging output as well."); - } -} diff --git a/P/Sd1/Array/Distinct/src/main/resources/log4j2.xml b/P/Sd1/Array/Distinct/src/main/resources/log4j2.xml deleted file mode 100644 index 130f87a144c4eb0107a846e580c8fa7f5e819fc1..0000000000000000000000000000000000000000 --- a/P/Sd1/Array/Distinct/src/main/resources/log4j2.xml +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<Configuration> - <Appenders> - <File name="A1" fileName="A1.log" append="false"> - <PatternLayout pattern="%t %-5p %c{2} - %m%n"/> - </File> - <Console name="STDOUT" target="SYSTEM_OUT"> - <PatternLayout pattern="%d %-5p [%t] %C{2} (%F:%L) - %m%n"/> - </Console> - </Appenders> - <Loggers> - - <!-- You my want to define class or package level per-logger rules --> - <Logger name="de.hdm_stuttgart.mi.sd1.App" level="debug"> - <AppenderRef ref="A1"/> - </Logger> - <Root level="info"> - <AppenderRef ref="STDOUT"/> - </Root> - </Loggers> -</Configuration> \ No newline at end of file diff --git a/P/Sd1/Array/Distinct/src/test/java/de/hdm_stuttgart/mi/sd1/AppTest.java b/P/Sd1/Array/Distinct/src/test/java/de/hdm_stuttgart/mi/sd1/AppTest.java deleted file mode 100644 index b83e8093c200b725170c6e0de9819b282dcfe33c..0000000000000000000000000000000000000000 --- a/P/Sd1/Array/Distinct/src/test/java/de/hdm_stuttgart/mi/sd1/AppTest.java +++ /dev/null @@ -1,17 +0,0 @@ -package de.hdm_stuttgart.mi.sd1; - -import org.junit.Assert; -import org.junit.Test; - -/** - * Unit test for simple App. - */ -public class AppTest { - /** - * Dummy test method - */ - @Test - public void testApp() { - Assert.assertTrue( true ); - } -} diff --git a/P/Sd1/Array/Distinct/src/test/java/de/hdm_stuttgart/mi/sd1/DistinctTest.java b/P/Sd1/Array/Distinct/src/test/java/de/hdm_stuttgart/mi/sd1/DistinctTest.java index 4ae7539a95f20f8159d2a4217eaf2850458d8cd6..ba59dca279b49d13e43edb83d2d687b5f4b79522 100644 --- a/P/Sd1/Array/Distinct/src/test/java/de/hdm_stuttgart/mi/sd1/DistinctTest.java +++ b/P/Sd1/Array/Distinct/src/test/java/de/hdm_stuttgart/mi/sd1/DistinctTest.java @@ -1,8 +1,8 @@ package de.hdm_stuttgart.mi.sd1; import de.hdm_stuttgart.mi.sd1.array.MyArray; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; import java.util.Arrays; @@ -17,28 +17,32 @@ public class DistinctTest { unique(new int[]{12, 6, 1, 4}); unique(new int[]{-99, 4, 333, 17, 0, 3, 55}); } + @Test public void testTwoDuplicate() { - Assert.assertArrayEquals(new int[]{6}, MyArray.distinct(new int[]{6, 6})); + Assertions.assertArrayEquals(new int[]{6}, MyArray.distinct(new int[]{6, 6})); } + @Test public void testThreeDuplicate() { - Assert.assertArrayEquals(new int[]{-1, 6}, MyArray.distinct(new int[]{-1, 6, 6})); - Assert.assertArrayEquals(new int[]{-1, 6}, MyArray.distinct(new int[]{6, -1, 6})); - Assert.assertArrayEquals(new int[]{-1, 6}, MyArray.distinct(new int[]{6, 6, -1})); + Assertions.assertArrayEquals(new int[]{-1, 6}, MyArray.distinct(new int[]{-1, 6, 6})); + Assertions.assertArrayEquals(new int[]{-1, 6}, MyArray.distinct(new int[]{6, -1, 6})); + Assertions.assertArrayEquals(new int[]{-1, 6}, MyArray.distinct(new int[]{6, 6, -1})); } + @Test public void testFourDuplicate() { - Assert.assertArrayEquals(new int[]{-1, 3, 6}, MyArray.distinct(new int[]{-1, 6, 6, 3})); - Assert.assertArrayEquals(new int[]{-1, 3, 6}, MyArray.distinct(new int[]{3, 6, -1, 6})); - Assert.assertArrayEquals(new int[]{-1, 3, 6}, MyArray.distinct(new int[]{6, 6, 3, -1})); + Assertions.assertArrayEquals(new int[]{-1, 3, 6}, MyArray.distinct(new int[]{-1, 6, 6, 3})); + Assertions.assertArrayEquals(new int[]{-1, 3, 6}, MyArray.distinct(new int[]{3, 6, -1, 6})); + Assertions.assertArrayEquals(new int[]{-1, 3, 6}, MyArray.distinct(new int[]{6, 6, 3, -1})); - Assert.assertArrayEquals(new int[]{1, 6}, MyArray.distinct(new int[]{1, 6, 1, 6})); - Assert.assertArrayEquals(new int[]{1, 6}, MyArray.distinct(new int[]{1, 6, 1, 6, 6, 6, 1 ,1, 6})); + Assertions.assertArrayEquals(new int[]{1, 6}, MyArray.distinct(new int[]{1, 6, 1, 6})); + Assertions.assertArrayEquals(new int[]{1, 6}, MyArray.distinct(new int[]{1, 6, 1, 6, 6, 6, 1 ,1, 6})); } + static void unique(final int[] values) { final int[] sortedValues = Arrays.copyOf(values, values.length); Arrays.sort(sortedValues); - Assert.assertArrayEquals(sortedValues, MyArray.distinct(values)); + Assertions.assertArrayEquals(sortedValues, MyArray.distinct(values)); } -} +} \ No newline at end of file diff --git a/P/Sd1/Array/StringArray2Html/.gitignore b/P/Sd1/Array/StringArray2Html/.gitignore index 4e247eee2103b4d4a35eba38166587fee1391f0e..7913c9beebc7f8a17a72343401f27a01c881bbcf 100644 --- a/P/Sd1/Array/StringArray2Html/.gitignore +++ b/P/Sd1/Array/StringArray2Html/.gitignore @@ -1,4 +1,8 @@ +/dependency-reduced-pom.xml +/A1.log /.settings -/target +/.idea +/*.iml /.classpath /.project +/target diff --git a/P/Sd1/Array/StringArray2Html/pom.xml b/P/Sd1/Array/StringArray2Html/pom.xml index 96fd8977b293858caa64d674062b4c855ff320f9..5e9cce0ae92da3578f2a19d9ec4e2be8e252f375 100644 --- a/P/Sd1/Array/StringArray2Html/pom.xml +++ b/P/Sd1/Array/StringArray2Html/pom.xml @@ -1,5 +1,5 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> @@ -16,16 +16,16 @@ <dependencies> <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter-api</artifactId> + <version>5.1.0</version> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-core</artifactId> - <version>2.9.1</version> + <version>2.11.0</version> </dependency> </dependencies> @@ -34,24 +34,22 @@ <plugins> <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>3.7.0</version> - <configuration> - <source>1.8</source> - <target>1.8</target> - </configuration> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.7.0</version> + <configuration> + <source>1.8</source> + <target>1.8</target> + </configuration> </plugin> <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-javadoc-plugin</artifactId> - <version>2.10.4</version> - <configuration/> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <version>3.0.0</version> + <configuration /> </plugin> </plugins> </build> - - -</project> +</project> \ No newline at end of file diff --git a/P/Sd1/Array/StringArray2Html/src/test/java/de/hdm_stuttgart/mi/sd1/stringarray2html_test/StringArrayTest.java b/P/Sd1/Array/StringArray2Html/src/test/java/de/hdm_stuttgart/mi/sd1/stringarray2html_test/StringArrayTest.java index d0f2933f6433b8060224b6c811aa4aa4c277c9e3..2dc5c665b16d39abb12d5289f2a833039985ef63 100644 --- a/P/Sd1/Array/StringArray2Html/src/test/java/de/hdm_stuttgart/mi/sd1/stringarray2html_test/StringArrayTest.java +++ b/P/Sd1/Array/StringArray2Html/src/test/java/de/hdm_stuttgart/mi/sd1/stringarray2html_test/StringArrayTest.java @@ -1,31 +1,31 @@ package de.hdm_stuttgart.mi.sd1.stringarray2html_test; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; import de.hdm_stuttgart.mi.sd1.stringarray2html.Stringarray2Html; -@SuppressWarnings("javadoc") public class StringArrayTest { - + @Test public void testnull() { - Assert.assertEquals("", Stringarray2Html.strings2html(null)); - + Assertions.assertEquals("", Stringarray2Html.strings2html(null)); + } + @Test public void testVoid() { - Assert.assertEquals("", Stringarray2Html.strings2html(new String[]{})); - + Assertions.assertEquals("", Stringarray2Html.strings2html(new String[]{})); + } + @Test public void testTwo() { - Assert.assertEquals("<ul>\n" - + " <li>one</li>\n" - + " <li>two</li>\n" - + "</ul>", - Stringarray2Html.strings2html(new String[]{"one", "two"})); - + Assertions.assertEquals("<ul>\n" + + " <li>one</li>\n" + + " <li>two</li>\n" + + "</ul>", + Stringarray2Html.strings2html(new String[]{"one", "two"})); + } - -} +} \ No newline at end of file diff --git a/P/Sd1/Array/arraycalcExercise/pom.xml b/P/Sd1/Array/arraycalcExercise/pom.xml index 868eb5d273b41b2da53418f5795957e7aa7d9e84..a7046c6c5600fbac607bdb9c34f410ffbf1cf955 100644 --- a/P/Sd1/Array/arraycalcExercise/pom.xml +++ b/P/Sd1/Array/arraycalcExercise/pom.xml @@ -1,5 +1,5 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> @@ -12,16 +12,16 @@ <dependencies> <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter-api</artifactId> + <version>5.1.0</version> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-core</artifactId> - <version>2.9.1</version> + <version>2.11.0</version> </dependency> </dependencies> @@ -30,20 +30,20 @@ <plugins> <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>3.7.0</version> - <configuration> - <source>1.8</source> - <target>1.8</target> - </configuration> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.7.0</version> + <configuration> + <source>1.8</source> + <target>1.8</target> + </configuration> </plugin> <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-javadoc-plugin</artifactId> - <version>2.10.4</version> - <configuration/> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <version>3.0.0</version> + <configuration/> </plugin> </plugins> diff --git a/P/Sd1/Array/arraycalcExercise/src/test/java/de/hdm_stuttgart/mi/sd1/fraction/ArrayMethodTest.java b/P/Sd1/Array/arraycalcExercise/src/test/java/de/hdm_stuttgart/mi/sd1/fraction/ArrayMethodTest.java index 680e8c571707b8e348f02bb57665c9ec3eb2acf8..1ccc110210e8ce74a6897299c9b011cf07af783f 100644 --- a/P/Sd1/Array/arraycalcExercise/src/test/java/de/hdm_stuttgart/mi/sd1/fraction/ArrayMethodTest.java +++ b/P/Sd1/Array/arraycalcExercise/src/test/java/de/hdm_stuttgart/mi/sd1/fraction/ArrayMethodTest.java @@ -1,18 +1,18 @@ package de.hdm_stuttgart.mi.sd1.fraction; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertArrayEquals; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.assertFalse; + +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.assertFalse; import java.util.Arrays; import de.hdm_stuttgart.mi.sd1.store.Arraymethods; -@Ignore // Remove me to enable testing your application + @SuppressWarnings("javadoc") public class ArrayMethodTest { @@ -96,12 +96,12 @@ public class ArrayMethodTest { "Borrow or rob?"}; for (final String p: palindromes) { - assertTrue(p, Arraymethods.isPalindrome(p)); + assertTrue(Arraymethods.isPalindrome(p), p + " is a palindrome"); } final String[] nonPalindromes = {"Sea", "Test it!"}; for (final String p: nonPalindromes) { - assertFalse(p, Arraymethods.isPalindrome(p)); + assertFalse(Arraymethods.isPalindrome(p), p + " is no palindrome"); } } diff --git a/P/Sd1/Array/arraycalcSolution/pom.xml b/P/Sd1/Array/arraycalcSolution/pom.xml index 0a5e29c714e89294ec8007d2fb7c40b43e8d2ec5..405aceb8987f7880b2672cde03a4840337ad6efb 100644 --- a/P/Sd1/Array/arraycalcSolution/pom.xml +++ b/P/Sd1/Array/arraycalcSolution/pom.xml @@ -1,11 +1,10 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>de.hdm-stuttgart.sd1</groupId> <artifactId>arraycalc</artifactId> <version>2.0</version> - <packaging>jar</packaging> <name>arraycalc</name> <url>https://freedocs.mi.hdm-stuttgart.de</url> @@ -16,16 +15,16 @@ <dependencies> <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter-api</artifactId> + <version>5.1.0</version> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-core</artifactId> - <version>2.9.1</version> + <version>2.11.0</version> </dependency> </dependencies> @@ -34,23 +33,23 @@ <plugins> <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>3.7.0</version> - <configuration> - <source>1.8</source> - <target>1.8</target> - </configuration> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.7.0</version> + <configuration> + <source>1.8</source> + <target>1.8</target> + </configuration> </plugin> <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-javadoc-plugin</artifactId> - <version>2.10.4</version> - <configuration/> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <version>3.0.0</version> + <configuration /> </plugin> </plugins> </build> -</project> +</project> \ No newline at end of file diff --git a/P/Sd1/Array/arraycalcSolution/src/main/java/de/hdm_stuttgart/mi/sd1/store/Arraymethods.java b/P/Sd1/Array/arraycalcSolution/src/main/java/de/hdm_stuttgart/mi/sd1/store/Arraymethods.java index ab081b795412cbdddc2ac4d3ac4a75ce3de0e4b9..336488df1f67e39eb30bf222e85c1f4055756ca9 100644 --- a/P/Sd1/Array/arraycalcSolution/src/main/java/de/hdm_stuttgart/mi/sd1/store/Arraymethods.java +++ b/P/Sd1/Array/arraycalcSolution/src/main/java/de/hdm_stuttgart/mi/sd1/store/Arraymethods.java @@ -159,4 +159,4 @@ public class Arraymethods { return false; } } -} +} \ No newline at end of file diff --git a/P/Sd1/Array/arraycalcSolution/src/test/java/de/hdm_stuttgart/mi/sd1/fraction/ArrayMethodTest.java b/P/Sd1/Array/arraycalcSolution/src/test/java/de/hdm_stuttgart/mi/sd1/fraction/ArrayMethodTest.java index 9dd3a4b29fbce8bab75b0e4c1993b4f1c8df23fe..1ccc110210e8ce74a6897299c9b011cf07af783f 100644 --- a/P/Sd1/Array/arraycalcSolution/src/test/java/de/hdm_stuttgart/mi/sd1/fraction/ArrayMethodTest.java +++ b/P/Sd1/Array/arraycalcSolution/src/test/java/de/hdm_stuttgart/mi/sd1/fraction/ArrayMethodTest.java @@ -1,16 +1,18 @@ package de.hdm_stuttgart.mi.sd1.fraction; -import org.junit.Test; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertArrayEquals; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.assertFalse; + +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.assertFalse; import java.util.Arrays; import de.hdm_stuttgart.mi.sd1.store.Arraymethods; + @SuppressWarnings("javadoc") public class ArrayMethodTest { @@ -94,12 +96,12 @@ public class ArrayMethodTest { "Borrow or rob?"}; for (final String p: palindromes) { - assertTrue(p, Arraymethods.isPalindrome(p)); + assertTrue(Arraymethods.isPalindrome(p), p + " is a palindrome"); } final String[] nonPalindromes = {"Sea", "Test it!"}; for (final String p: nonPalindromes) { - assertFalse(p, Arraymethods.isPalindrome(p)); + assertFalse(Arraymethods.isPalindrome(p), p + " is no palindrome"); } } diff --git a/P/Sd1/Array/integerStore/pom.xml b/P/Sd1/Array/integerStore/pom.xml index cafbc2dc6710daf32ea392379eed1a8ab7ff4e15..95bd8f7bf650d6d04236017a88cb3d9d96c8a404 100644 --- a/P/Sd1/Array/integerStore/pom.xml +++ b/P/Sd1/Array/integerStore/pom.xml @@ -1,5 +1,5 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> @@ -7,8 +7,6 @@ <artifactId>intstore</artifactId> <version>2.0</version> - <packaging>jar</packaging> - <name>IntegerStore</name> <url>https://freedocs.mi.hdm-stuttgart.de</url> @@ -18,16 +16,16 @@ <dependencies> <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter-api</artifactId> + <version>5.1.0</version> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-core</artifactId> - <version>2.9.1</version> + <version>2.11.0</version> </dependency> </dependencies> @@ -36,22 +34,22 @@ <plugins> <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>3.7.0</version> - <configuration> - <source>1.8</source> - <target>1.8</target> - </configuration> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.7.0</version> + <configuration> + <source>1.8</source> + <target>1.8</target> + </configuration> </plugin> <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-javadoc-plugin</artifactId> - <version>2.10.4</version> - <configuration/> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <version>3.0.0</version> + <configuration/> </plugin> </plugins> </build> -</project> +</project> \ No newline at end of file diff --git a/P/Sd1/Array/integerStore/src/main/java/de/hdm_stuttgart/mi/sd1/main/Driver.java b/P/Sd1/Array/integerStore/src/main/java/de/hdm_stuttgart/mi/sd1/main/Driver.java index cdb15507838c722d509fd481a2d414e58eb855e3..d9285a88024515eaa224558e59c3a9f1d1dc5c82 100644 --- a/P/Sd1/Array/integerStore/src/main/java/de/hdm_stuttgart/mi/sd1/main/Driver.java +++ b/P/Sd1/Array/integerStore/src/main/java/de/hdm_stuttgart/mi/sd1/main/Driver.java @@ -3,7 +3,7 @@ package de.hdm_stuttgart.mi.sd1.main; import de.hdm_stuttgart.mi.sd1.store.BoundedIntegerStore; /** - * Playing with fraction objects, producing some output. + * Playing with bounded stack, producing some output. * */ public class Driver { diff --git a/P/Sd1/Array/integerStore/src/test/java/de/hdm_stuttgart/mi/sd1/fraction/IntStoreTest.java b/P/Sd1/Array/integerStore/src/test/java/de/hdm_stuttgart/mi/sd1/fraction/IntStoreTest.java index 456ff1bcc70b3b0c96e2f260eec43142536a88d2..fc95e38bf13cc00931a00bd6dd6717929504a482 100644 --- a/P/Sd1/Array/integerStore/src/test/java/de/hdm_stuttgart/mi/sd1/fraction/IntStoreTest.java +++ b/P/Sd1/Array/integerStore/src/test/java/de/hdm_stuttgart/mi/sd1/fraction/IntStoreTest.java @@ -1,8 +1,8 @@ package de.hdm_stuttgart.mi.sd1.fraction; -import static org.junit.Assert.*; +import static org.junit.jupiter.api.Assertions.assertEquals; -import org.junit.Test; +import org.junit.jupiter.api.Test; import de.hdm_stuttgart.mi.sd1.store.BoundedIntegerStore; @@ -32,4 +32,4 @@ public class IntStoreTest { assertEquals(v2, store.getValue(1)); assertEquals(v3, store.getValue(2)); } -} +} \ No newline at end of file diff --git a/P/Sd1/Array/integerStoreMedianAnswer/pom.xml b/P/Sd1/Array/integerStoreMedianAnswer/pom.xml index eeee2026ce623bf9b91beca540b1190c7ed1db86..cdc6d28f8d08320eaf772f7f6e7c03bd9f302654 100644 --- a/P/Sd1/Array/integerStoreMedianAnswer/pom.xml +++ b/P/Sd1/Array/integerStoreMedianAnswer/pom.xml @@ -1,5 +1,5 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>de.hdm-stuttgart.sd1</groupId> @@ -15,16 +15,16 @@ <dependencies> <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter-api</artifactId> + <version>5.1.0</version> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-core</artifactId> - <version>2.9.1</version> + <version>2.11.0</version> </dependency> </dependencies> @@ -32,16 +32,23 @@ <build> <plugins> <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>3.7.0</version> - <configuration> - <source>1.8</source> - <target>1.8</target> - </configuration> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.7.0</version> + <configuration> + <source>1.8</source> + <target>1.8</target> + </configuration> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <version>3.0.0</version> + <configuration/> </plugin> </plugins> </build> -</project> +</project> \ No newline at end of file diff --git a/P/Sd1/Array/integerStoreMedianAnswer/src/main/java/de/hdm_stuttgart/mi/sd1/main/Driver.java b/P/Sd1/Array/integerStoreMedianAnswer/src/main/java/de/hdm_stuttgart/mi/sd1/main/Driver.java index 1d0bdce138721bab144b16522a9cd150179c69ff..55ee5265b67242934c59d0c53fb45a29c873c6f9 100644 --- a/P/Sd1/Array/integerStoreMedianAnswer/src/main/java/de/hdm_stuttgart/mi/sd1/main/Driver.java +++ b/P/Sd1/Array/integerStoreMedianAnswer/src/main/java/de/hdm_stuttgart/mi/sd1/main/Driver.java @@ -5,7 +5,7 @@ import java.util.Scanner; import de.hdm_stuttgart.mi.sd1.store.IntegerStore; /** - * Ask a user for inputting sample values and then + * Ask a user for sample input values to * calculate average and median. * */ diff --git a/P/Sd1/Array/integerStoreMedianAnswer/src/test/java/de/hdm_stuttgart/mi/sd1/store/TestSorting.java b/P/Sd1/Array/integerStoreMedianAnswer/src/test/java/de/hdm_stuttgart/mi/sd1/store/TestSorting.java index f3a46f66b941b14a6598fe35b05ef4318a7db112..41daf3b31def81247ab17d69403acf79c128870d 100644 --- a/P/Sd1/Array/integerStoreMedianAnswer/src/test/java/de/hdm_stuttgart/mi/sd1/store/TestSorting.java +++ b/P/Sd1/Array/integerStoreMedianAnswer/src/test/java/de/hdm_stuttgart/mi/sd1/store/TestSorting.java @@ -1,9 +1,9 @@ package de.hdm_stuttgart.mi.sd1.store; -import static org.junit.Assert.*; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertArrayEquals; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; @SuppressWarnings("javadoc") public class TestSorting { @@ -83,6 +83,6 @@ public class TestSorting { for (final int i: unsortedValues) { store.addValue(i); } - Assert.assertArrayEquals(sortedValues, store.getValues()); + assertArrayEquals(sortedValues, store.getValues()); } } diff --git a/P/Sd1/Array/integerStoreMedianAnswer/src/test/java/de/hdm_stuttgart/mi/sd1/store/TestStatisticMethods.java b/P/Sd1/Array/integerStoreMedianAnswer/src/test/java/de/hdm_stuttgart/mi/sd1/store/TestStatisticMethods.java index c055f5e8e826ff51160ac1195b9e5cb4a9f4ab5c..f543174d1530387fd82e919aa76ef17e73f9e988 100644 --- a/P/Sd1/Array/integerStoreMedianAnswer/src/test/java/de/hdm_stuttgart/mi/sd1/store/TestStatisticMethods.java +++ b/P/Sd1/Array/integerStoreMedianAnswer/src/test/java/de/hdm_stuttgart/mi/sd1/store/TestStatisticMethods.java @@ -1,8 +1,10 @@ package de.hdm_stuttgart.mi.sd1.store; -import static org.junit.Assert.*; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.Test; +import org.junit.jupiter.api.Test; import de.hdm_stuttgart.mi.sd1.store.IntegerStore; diff --git a/P/Sd1/Array/integerStoreSkeleton/pom.xml b/P/Sd1/Array/integerStoreSkeleton/pom.xml index c5311439b93c63b3e8444ea1856d2588becc89c3..db1493bce4b21cecf75310325f40e15f2d68acd4 100644 --- a/P/Sd1/Array/integerStoreSkeleton/pom.xml +++ b/P/Sd1/Array/integerStoreSkeleton/pom.xml @@ -1,5 +1,5 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>de.hdm-stuttgart.sd1</groupId> @@ -16,40 +16,40 @@ <dependencies> <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter-api</artifactId> + <version>5.1.0</version> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-core</artifactId> - <version>2.9.1</version> + <version>2.11.0</version> </dependency> </dependencies> <build> <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>3.7.0</version> - <configuration> - <source>1.8</source> - <target>1.8</target> - </configuration> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.7.0</version> + <configuration> + <source>1.8</source> + <target>1.8</target> + </configuration> </plugin> <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-javadoc-plugin</artifactId> - <version>2.10.4</version> - <configuration/> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <version>3.0.0</version> + <configuration/> </plugin> </plugins> </build> -</project> + +</project> \ No newline at end of file diff --git a/P/Sd1/Array/integerStoreSkeleton/src/main/java/de/hdm_stuttgart/mi/sd1/main/Driver.java b/P/Sd1/Array/integerStoreSkeleton/src/main/java/de/hdm_stuttgart/mi/sd1/main/Driver.java index 9b47718ebc227782dcb22529e0ce08499b388f15..bbe088811fcd11ca684726de5e420fc62bac3718 100644 --- a/P/Sd1/Array/integerStoreSkeleton/src/main/java/de/hdm_stuttgart/mi/sd1/main/Driver.java +++ b/P/Sd1/Array/integerStoreSkeleton/src/main/java/de/hdm_stuttgart/mi/sd1/main/Driver.java @@ -3,7 +3,7 @@ package de.hdm_stuttgart.mi.sd1.main; import de.hdm_stuttgart.mi.sd1.store.BoundedIntegerStore; /** - * Playing with fraction objects, producing some output. + * Playing with store, producing some output. * */ public class Driver { diff --git a/P/Sd1/Array/integerStoreSkeleton/src/test/java/de/hdm_stuttgart/mi/sd1/fraction/IntStoreTest.java b/P/Sd1/Array/integerStoreSkeleton/src/test/java/de/hdm_stuttgart/mi/sd1/fraction/IntStoreTest.java index aeb11185f1c3bf5d4a678396c1c4b28c8ae35ea3..0d101554f93b0f4e1c5b34d291df50602bfb301c 100644 --- a/P/Sd1/Array/integerStoreSkeleton/src/test/java/de/hdm_stuttgart/mi/sd1/fraction/IntStoreTest.java +++ b/P/Sd1/Array/integerStoreSkeleton/src/test/java/de/hdm_stuttgart/mi/sd1/fraction/IntStoreTest.java @@ -1,14 +1,14 @@ package de.hdm_stuttgart.mi.sd1.fraction; -import static org.junit.Assert.*; +import static org.junit.jupiter.api.Assertions.assertEquals; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import de.hdm_stuttgart.mi.sd1.store.BoundedIntegerStore; @SuppressWarnings("javadoc") -@Ignore +@Disabled public class IntStoreTest { @Test diff --git a/P/Sd1/Array/integerStoreStat/pom.xml b/P/Sd1/Array/integerStoreStat/pom.xml index 9fae115d81d25d187825a3a250fe804d3be5a699..3c341c84821a6adcbcbd32e1e28ab2cff673eeea 100644 --- a/P/Sd1/Array/integerStoreStat/pom.xml +++ b/P/Sd1/Array/integerStoreStat/pom.xml @@ -1,5 +1,5 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>de.hdm-stuttgart.sd1</groupId> @@ -15,16 +15,16 @@ <dependencies> <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter-api</artifactId> + <version>5.1.0</version> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-core</artifactId> - <version>2.9.1</version> + <version>2.11.0</version> </dependency> </dependencies> @@ -33,22 +33,46 @@ <plugins> <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>3.7.0</version> - <configuration> - <source>1.8</source> - <target>1.8</target> - </configuration> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.7.0</version> + <configuration> + <source>1.8</source> + <target>1.8</target> + </configuration> </plugin> <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-javadoc-plugin</artifactId> - <version>2.10.4</version> - <configuration/> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <version>3.0.0</version> + <configuration/> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-shade-plugin</artifactId> + <version>3.1.0</version> + <configuration> + <transformers> + <transformer + implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> + <manifestEntries> + <Main-Class>App</Main-Class> + </manifestEntries> + </transformer> + </transformers> + </configuration> + <executions> + <execution> + <phase>package</phase> + <goals> + <goal>shade</goal> + </goals> + </execution> + </executions> </plugin> </plugins> </build> -</project> +</project> \ No newline at end of file diff --git a/P/Sd1/Array/integerStoreStat/src/main/java/de/hdm_stuttgart/mi/sd1/main/Driver.java b/P/Sd1/Array/integerStoreStat/src/main/java/de/hdm_stuttgart/mi/sd1/main/Driver.java index 55ce85c245bf4c51c941021280188d2b559b4500..63163ec9e1bce5a7e8dce4c24a19e7194d30b838 100644 --- a/P/Sd1/Array/integerStoreStat/src/main/java/de/hdm_stuttgart/mi/sd1/main/Driver.java +++ b/P/Sd1/Array/integerStoreStat/src/main/java/de/hdm_stuttgart/mi/sd1/main/Driver.java @@ -3,7 +3,7 @@ package de.hdm_stuttgart.mi.sd1.main; import de.hdm_stuttgart.mi.sd1.store.IntegerStore; /** - * Playing with fraction objects, producing some output. + * Playing with integer store objects, producing some output. * */ public class Driver { @@ -26,4 +26,4 @@ public class Driver { System.out.println("Value " + (i + 1) + ": " + store.getValue(i)); } } -} +} \ No newline at end of file diff --git a/P/Sd1/Array/integerStoreStat/src/test/java/de/hdm_stuttgart/mi/sd1/fraction/IntStoreTest.java b/P/Sd1/Array/integerStoreStat/src/test/java/de/hdm_stuttgart/mi/sd1/fraction/IntStoreTest.java index 851b14bc57950694bc9e35c86eaa9fd4b207b23c..fd534b24a9461dfa28b7bfa1a00e7f8d1bcad6b8 100644 --- a/P/Sd1/Array/integerStoreStat/src/test/java/de/hdm_stuttgart/mi/sd1/fraction/IntStoreTest.java +++ b/P/Sd1/Array/integerStoreStat/src/test/java/de/hdm_stuttgart/mi/sd1/fraction/IntStoreTest.java @@ -1,8 +1,9 @@ package de.hdm_stuttgart.mi.sd1.fraction; -import static org.junit.Assert.*; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.Test; +import org.junit.jupiter.api.Test; import de.hdm_stuttgart.mi.sd1.store.IntegerStore; @@ -76,4 +77,4 @@ public class IntStoreTest { assertTrue(100_000 <= store.getCapacity()); // Capacity should at least be 100_000 } -} +} \ No newline at end of file diff --git a/P/Sd1/Array/integerStoreUnbounded/pom.xml b/P/Sd1/Array/integerStoreUnbounded/pom.xml index 065f10d78f38ef91f537209f22712fa701e6da51..91632f984fa652e0d494e8445c1e8de875d07ba0 100644 --- a/P/Sd1/Array/integerStoreUnbounded/pom.xml +++ b/P/Sd1/Array/integerStoreUnbounded/pom.xml @@ -1,6 +1,5 @@ - <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> @@ -18,16 +17,16 @@ <dependencies> <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter-api</artifactId> + <version>5.1.0</version> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-core</artifactId> - <version>2.9.1</version> + <version>2.11.0</version> </dependency> </dependencies> @@ -36,22 +35,46 @@ <plugins> <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>3.7.0</version> - <configuration> - <source>1.8</source> - <target>1.8</target> - </configuration> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.7.0</version> + <configuration> + <source>1.8</source> + <target>1.8</target> + </configuration> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <version>3.0.0</version> + <configuration/> </plugin> <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-javadoc-plugin</artifactId> - <version>2.10.4</version> - <configuration /> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-shade-plugin</artifactId> + <version>3.1.0</version> + <configuration> + <transformers> + <transformer + implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> + <manifestEntries> + <Main-Class>App</Main-Class> + </manifestEntries> + </transformer> + </transformers> + </configuration> + <executions> + <execution> + <phase>package</phase> + <goals> + <goal>shade</goal> + </goals> + </execution> + </executions> </plugin> </plugins> </build> -</project> +</project> \ No newline at end of file diff --git a/P/Sd1/Array/integerStoreUnbounded/src/main/java/de/hdm_stuttgart/mi/sd1/main/Driver.java b/P/Sd1/Array/integerStoreUnbounded/src/main/java/de/hdm_stuttgart/mi/sd1/main/Driver.java index fff2ebca8eec5f5ca3fbe8e7b49b10ecb881f485..009f2a2786053c0d7c05ac41bf35f0266d1e6bb8 100644 --- a/P/Sd1/Array/integerStoreUnbounded/src/main/java/de/hdm_stuttgart/mi/sd1/main/Driver.java +++ b/P/Sd1/Array/integerStoreUnbounded/src/main/java/de/hdm_stuttgart/mi/sd1/main/Driver.java @@ -3,7 +3,7 @@ package de.hdm_stuttgart.mi.sd1.main; import de.hdm_stuttgart.mi.sd1.store.IntegerStore; /** - * Playing with fraction objects, producing some output. + * Playing with integer store object, producing some output. * */ public class Driver { @@ -26,4 +26,4 @@ public class Driver { System.out.println("Value " + (i + 1) + ": " + store.getValue(i)); } } -} +} \ No newline at end of file diff --git a/P/Sd1/Array/integerStoreUnbounded/src/test/java/de/hdm_stuttgart/mi/sd1/fraction/IntStoreTest.java b/P/Sd1/Array/integerStoreUnbounded/src/test/java/de/hdm_stuttgart/mi/sd1/fraction/IntStoreTest.java index 8e6eb802bc53f230a3b6c08c627ae74adf6acd7e..c9c5a7d86b845660f8e655150ca470f60b5053f7 100644 --- a/P/Sd1/Array/integerStoreUnbounded/src/test/java/de/hdm_stuttgart/mi/sd1/fraction/IntStoreTest.java +++ b/P/Sd1/Array/integerStoreUnbounded/src/test/java/de/hdm_stuttgart/mi/sd1/fraction/IntStoreTest.java @@ -1,49 +1,49 @@ package de.hdm_stuttgart.mi.sd1.fraction; -import static org.junit.Assert.*; - -import org.junit.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; +import org.junit.jupiter.api.Test; import de.hdm_stuttgart.mi.sd1.store.IntegerStore; @SuppressWarnings("javadoc") public class IntStoreTest { - @SuppressWarnings("static-method") - @Test - public void testPositiveNegative() { - final int capacity = 3; - IntegerStore store = new IntegerStore(capacity); + @SuppressWarnings("static-method") + @Test + public void testPositiveNegative() { + final int capacity = 3; + IntegerStore store = new IntegerStore(capacity); - assertEquals(capacity, store.getCapacity()); // The store's initial capacity - assertEquals(0, store.getNumValues()); // Store is initially empty + assertEquals(capacity, store.getCapacity()); // The store's initial capacity + assertEquals(0, store.getNumValues()); // Store is initially empty - final int v1 = -17, v2 = 3, v3 = -4, v4 = 7; + final int v1 = -17, v2 = 3, v3 = -4, v4 = 7; - store.addValue(v1); // Add a single value - assertEquals(1, store.getNumValues()); // Store contains one value - assertEquals(v1, store.getValue(0)); // Value should be present at index 0 + store.addValue(v1); // Add a single value + assertEquals(1, store.getNumValues()); // Store contains one value + assertEquals(v1, store.getValue(0)); // Value should be present at index 0 - store.addValue(v2); // Add two more values - store.addValue(v3); + store.addValue(v2); // Add two more values + store.addValue(v3); - assertEquals(capacity, store.getCapacity()); // The store's initial capacity - assertEquals(3, store.getNumValues()); // Store contains three values - assertEquals(v1, store.getValue(0)); // Retrieve all values - assertEquals(v2, store.getValue(1)); - assertEquals(v3, store.getValue(2)); + assertEquals(capacity, store.getCapacity()); // The store's initial capacity + assertEquals(3, store.getNumValues()); // Store contains three values + assertEquals(v1, store.getValue(0)); // Retrieve all values + assertEquals(v2, store.getValue(1)); + assertEquals(v3, store.getValue(2)); - // Now we breach the container's initial capacity - store.addValue(v4); - assertEquals(2 * capacity, store.getCapacity()); // Twice the store's initial capacity + // Now we breach the container's initial capacity + store.addValue(v4); + assertEquals(2 * capacity, store.getCapacity()); // Twice the store's initial capacity - // add 99996 more values - for (int i = 4; i < 100_000; i++) { - store.addValue(i); - } - assertEquals(100_000, store.getNumValues()); - assertTrue(100_000 <= store.getCapacity()); // Capacity should at least be 100_000 + // add 99996 more values + for (int i = 4; i < 100_000; i++) { + store.addValue(i); + } + assertEquals(100_000, store.getNumValues()); + assertTrue(100_000 <= store.getCapacity()); // Capacity should at least be 100_000 - } + } } diff --git a/P/Sd1/Array/marking/pom.xml b/P/Sd1/Array/marking/pom.xml index 292154fc7d23b02295f3fc56d4eb02cf32ff37b8..fb70bcb774b6492471aebb5f061d7b5429064aee 100644 --- a/P/Sd1/Array/marking/pom.xml +++ b/P/Sd1/Array/marking/pom.xml @@ -15,46 +15,64 @@ <dependencies> <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter-api</artifactId> + <version>5.1.0</version> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-core</artifactId> - <version>2.9.1</version> + <version>2.11.0</version> </dependency> </dependencies> <build> <plugins> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.7.0</version> + <configuration> + <source>1.8</source> + <target>1.8</target> + </configuration> + </plugin> + <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>3.7.0</version> - <configuration> - <source>1.8</source> - <target>1.8</target> - </configuration> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <version>3.0.0</version> + <configuration/> </plugin> + <plugin> <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <version>3.0.2</version> + <artifactId>maven-shade-plugin</artifactId> + <version>3.1.0</version> <configuration> - <archive> - <manifest> - <addClasspath>true</addClasspath> - <mainClass>de.hdm_stuttgart.mi.marking.Marks</mainClass> - </manifest> - </archive> + <transformers> + <transformer + implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> + <manifestEntries> + <Main-Class>App</Main-Class> + </manifestEntries> + </transformer> + </transformers> </configuration> + <executions> + <execution> + <phase>package</phase> + <goals> + <goal>shade</goal> + </goals> + </execution> + </executions> </plugin> </plugins> </build> - </project> diff --git a/P/Sd1/Array/marking/src/main/java/de/hdm_stuttgart/mi/marking/MarkingFrequencies.java b/P/Sd1/Array/marking/src/main/java/de/hdm_stuttgart/mi/marking/MarkingFrequencies.java index 6033ee0392356e1ad3c2327d56b3f907b314b81f..5481d04b42c0f27e02ce0679486f5116f97bd8d5 100644 --- a/P/Sd1/Array/marking/src/main/java/de/hdm_stuttgart/mi/marking/MarkingFrequencies.java +++ b/P/Sd1/Array/marking/src/main/java/de/hdm_stuttgart/mi/marking/MarkingFrequencies.java @@ -14,4 +14,4 @@ public class MarkingFrequencies { System.out.println(" " + (lowestMark + i - 1) + "|" + frequencies[i]); } } -} +} \ No newline at end of file diff --git a/P/Sd1/Array/marking/src/main/java/de/hdm_stuttgart/mi/marking/Marks.java b/P/Sd1/Array/marking/src/main/java/de/hdm_stuttgart/mi/marking/Marks.java index f63644f809245f978686d5b405096a36b97750f2..84719d880930ee6491811ed6fbfac028d2ae7e50 100644 --- a/P/Sd1/Array/marking/src/main/java/de/hdm_stuttgart/mi/marking/Marks.java +++ b/P/Sd1/Array/marking/src/main/java/de/hdm_stuttgart/mi/marking/Marks.java @@ -102,4 +102,4 @@ public class Marks { return ret; } -} +} \ No newline at end of file diff --git a/P/Sd1/Array/marking/src/test/java/de/hdm_stuttgart/mi/marking/AppTest.java b/P/Sd1/Array/marking/src/test/java/de/hdm_stuttgart/mi/marking/AppTest.java index a32eabd42487fc88469472bfda4c523a01f4abd3..9ef29508d0208ec8ebc3fdc97d224656219da877 100644 --- a/P/Sd1/Array/marking/src/test/java/de/hdm_stuttgart/mi/marking/AppTest.java +++ b/P/Sd1/Array/marking/src/test/java/de/hdm_stuttgart/mi/marking/AppTest.java @@ -1,8 +1,7 @@ package de.hdm_stuttgart.mi.marking; -import org.junit.Assert; -import org.junit.Test; - +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; /** * Unit test for simple App. */ @@ -10,15 +9,15 @@ public class AppTest { @Test public void testSingle() { - Assert.assertArrayEquals( + Assertions.assertArrayEquals( new int[]{-3, 1}, Marks.getFrequencies(new int[]{-3})); } @Test public void testMultiple() { - Assert.assertArrayEquals( + Assertions.assertArrayEquals( new int[]{-3, 2, 1, 0, 0, 0, 2, 0, 3}, // smallest value -3 followed by frequencies Marks.getFrequencies(new int[]{-3, 4 , 2, -2, 4, -3, 2, 4})); } -} +} \ No newline at end of file diff --git a/P/Sd1/Array/medianCmdLine/pom.xml b/P/Sd1/Array/medianCmdLine/pom.xml index 2e8ae0a26165ac746fdd24c1a132ba01e60f64e8..a3cd6da3402d9f9e28ecbcb00aaa66bd7b6e02e7 100644 --- a/P/Sd1/Array/medianCmdLine/pom.xml +++ b/P/Sd1/Array/medianCmdLine/pom.xml @@ -1,5 +1,5 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>de.hdm-stuttgart.sd1</groupId> @@ -16,16 +16,16 @@ <dependencies> <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter-api</artifactId> + <version>5.1.0</version> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-core</artifactId> - <version>2.9.1</version> + <version>2.11.0</version> </dependency> </dependencies> @@ -34,22 +34,46 @@ <plugins> <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>3.7.0</version> - <configuration> - <source>1.8</source> - <target>1.8</target> - </configuration> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.7.0</version> + <configuration> + <source>1.8</source> + <target>1.8</target> + </configuration> </plugin> <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-javadoc-plugin</artifactId> - <version>2.10.4</version> - <configuration/> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <version>3.0.0</version> + <configuration/> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-shade-plugin</artifactId> + <version>3.1.0</version> + <configuration> + <transformers> + <transformer + implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> + <manifestEntries> + <Main-Class>App</Main-Class> + </manifestEntries> + </transformer> + </transformers> + </configuration> + <executions> + <execution> + <phase>package</phase> + <goals> + <goal>shade</goal> + </goals> + </execution> + </executions> </plugin> </plugins> </build> -</project> +</project> \ No newline at end of file diff --git a/P/Sd1/Array/medianCmdLine/src/main/java/de/hdm_stuttgart/mi/sd1/statistics/main/ErrorState.java b/P/Sd1/Array/medianCmdLine/src/main/java/de/hdm_stuttgart/mi/sd1/statistics/main/ErrorState.java index 394dc95aa07459432cb931d3a5574cfb557d53f4..da8669ff68919d828a45025cce7a0fcc9ab4e1ed 100644 --- a/P/Sd1/Array/medianCmdLine/src/main/java/de/hdm_stuttgart/mi/sd1/statistics/main/ErrorState.java +++ b/P/Sd1/Array/medianCmdLine/src/main/java/de/hdm_stuttgart/mi/sd1/statistics/main/ErrorState.java @@ -31,4 +31,4 @@ public enum ErrorState { */ public final int errorCode; -} +} \ No newline at end of file diff --git a/P/Sd1/Array/medianCmdLine/src/main/java/de/hdm_stuttgart/mi/sd1/statistics/main/InputValidator.java b/P/Sd1/Array/medianCmdLine/src/main/java/de/hdm_stuttgart/mi/sd1/statistics/main/InputValidator.java index 731038dd4e492d80a586553bcc56ee65fd39eac7..9e0690f4455affb1fe6870e26bb30d87ca00cbdb 100644 --- a/P/Sd1/Array/medianCmdLine/src/main/java/de/hdm_stuttgart/mi/sd1/statistics/main/InputValidator.java +++ b/P/Sd1/Array/medianCmdLine/src/main/java/de/hdm_stuttgart/mi/sd1/statistics/main/InputValidator.java @@ -68,4 +68,4 @@ public class InputValidator { public ErrorState getErrorState() { return errorState; } -} +} \ No newline at end of file diff --git a/P/Sd1/Array/medianCmdLine/src/main/java/de/hdm_stuttgart/mi/sd1/statistics/main/Statistics.java b/P/Sd1/Array/medianCmdLine/src/main/java/de/hdm_stuttgart/mi/sd1/statistics/main/Statistics.java index dbbee4ca1044c247fa4b4425eed0f6431901288c..0adf030caa9b5bf017979a5e1e1d397e61903cc1 100644 --- a/P/Sd1/Array/medianCmdLine/src/main/java/de/hdm_stuttgart/mi/sd1/statistics/main/Statistics.java +++ b/P/Sd1/Array/medianCmdLine/src/main/java/de/hdm_stuttgart/mi/sd1/statistics/main/Statistics.java @@ -21,4 +21,4 @@ public class Statistics { System.out.println("Your sample's average is: " + store.getAverage()); System.out.println("Your sample's median is: " + store.getMedian()); } -} +} \ No newline at end of file diff --git a/P/Sd1/Array/medianCmdLine/src/test/java/de/hdm_stuttgart/mi/sd1/store/TestSorting.java b/P/Sd1/Array/medianCmdLine/src/test/java/de/hdm_stuttgart/mi/sd1/store/TestSorting.java index 2157357451e0825769b5d1d7f3776ec63e0b1811..a2b84647450042a5e07ead70c347f2e6119b96cc 100644 --- a/P/Sd1/Array/medianCmdLine/src/test/java/de/hdm_stuttgart/mi/sd1/store/TestSorting.java +++ b/P/Sd1/Array/medianCmdLine/src/test/java/de/hdm_stuttgart/mi/sd1/store/TestSorting.java @@ -1,9 +1,9 @@ package de.hdm_stuttgart.mi.sd1.store; -import static org.junit.Assert.*; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertArrayEquals; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import de.hdm_stuttgart.mi.sd1.statistics.IntegerStore; @@ -13,13 +13,13 @@ public class TestSorting { @Test public void simpleSort() { final int[] - unsortedValues = {0, -1, 5, 2, 7, 6}, - sortedValues = {-1, 0, 2, 5, 6, 7}; + unsortedValues = {0, -1, 5, 2, 7, 6}, + sortedValues = {-1, 0, 2, 5, 6, 7}; assertEquals(sortedValues.length, unsortedValues.length); final IntegerStore store = new IntegerStore(); - for (final int i: unsortedValues) { + for (final int i : unsortedValues) { store.addValue(i); } assertArrayEquals(sortedValues, store.getValues()); @@ -28,15 +28,15 @@ public class TestSorting { @Test public void duplicateSort() { final int[] - unsortedValues = {0, -7, 3, 2, 3, -4, 3, 4, 5, -7}, - sortedValues = {-7, -7, -4, 0, 2, 3, 3, 3, 4, 5}; - + unsortedValues = {0, -7, 3, 2, 3, -4, 3, 4, 5, -7}, + sortedValues = {-7, -7, -4, 0, 2, 3, 3, 3, 4, 5}; + assertEquals(sortedValues.length, unsortedValues.length); final IntegerStore store = new IntegerStore(); - for (final int i: unsortedValues) { + for (final int i : unsortedValues) { store.addValue(i); } - Assert.assertArrayEquals(sortedValues, store.getValues()); + assertArrayEquals(sortedValues, store.getValues()); } -} +} \ No newline at end of file diff --git a/P/Sd1/Array/medianCmdLine/src/test/java/de/hdm_stuttgart/mi/sd1/store/TestStatisticMethods.java b/P/Sd1/Array/medianCmdLine/src/test/java/de/hdm_stuttgart/mi/sd1/store/TestStatisticMethods.java index 0668d0ea3e29ec2c1a93acb3b5dd40b32024de03..3ec5876c73f492a8a8569e75503edda46f63dad8 100644 --- a/P/Sd1/Array/medianCmdLine/src/test/java/de/hdm_stuttgart/mi/sd1/store/TestStatisticMethods.java +++ b/P/Sd1/Array/medianCmdLine/src/test/java/de/hdm_stuttgart/mi/sd1/store/TestStatisticMethods.java @@ -1,8 +1,10 @@ package de.hdm_stuttgart.mi.sd1.store; -import static org.junit.Assert.*; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.Test; +import org.junit.jupiter.api.Test; import de.hdm_stuttgart.mi.sd1.statistics.IntegerStore; @@ -92,4 +94,4 @@ public class TestStatisticMethods { assertArrayEquals(new int[] {-3, 0, 2, 4, 6, 7, 7, 7}, store.getValues()); assertTrue(Math.abs(5. - store.getMedian()) < 1.E-50); } -} +} \ No newline at end of file diff --git a/P/Sd1/Array/medianCmdLine/src/test/java/de/hdm_stuttgart/mi/sd1/store/TestValidation.java b/P/Sd1/Array/medianCmdLine/src/test/java/de/hdm_stuttgart/mi/sd1/store/TestValidation.java index 15a884354bdbc3bd15314dc561ca21a05e5e3d8b..410a04d688ac74601e98f7d6bcaea391b3cb27af 100644 --- a/P/Sd1/Array/medianCmdLine/src/test/java/de/hdm_stuttgart/mi/sd1/store/TestValidation.java +++ b/P/Sd1/Array/medianCmdLine/src/test/java/de/hdm_stuttgart/mi/sd1/store/TestValidation.java @@ -1,10 +1,10 @@ package de.hdm_stuttgart.mi.sd1.store; -import static org.junit.Assert.assertArrayEquals; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.Test; +import org.junit.jupiter.api.Test; import de.hdm_stuttgart.mi.sd1.statistics.main.ErrorState; import de.hdm_stuttgart.mi.sd1.statistics.main.InputValidator; @@ -41,4 +41,4 @@ public class TestValidation { assertEquals(ErrorState.NO_INTEGER, inputValidate.getErrorState()); assertTrue(null != inputValidate.getErrorMessage()); } -} +} \ No newline at end of file diff --git a/P/Sd1/todo.txt b/P/Sd1/todo.txt new file mode 100644 index 0000000000000000000000000000000000000000..b24832f004684f2881926b8f6973b4af99d17585 --- /dev/null +++ b/P/Sd1/todo.txt @@ -0,0 +1,54 @@ +./Array/medianCmdLine/pom.xml +./Binomial/V1/pom.xml +./Binomial/V3/pom.xml +./Collection/Intro/LookupSet/pom.xml +./CollectionImplement/StringSet/Solution/pom.xml +./ConsoleSum/V1/pom.xml +./ConsoleSum/V3/pom.xml +./CoreClasses/StringMask/pom.xml +./Euler/11/largestproductingrid/pom.xml +./Figure/BaseClass/pom.xml +./Figure/Scale/pom.xml +./Figure/ToString/pom.xml +./Filepath/pom.xml +./Gcd/V1/pom.xml +./HtmlFormatting/Simple/Exercise/pom.xml +./HtmlFormatting/Simple/Solution/pom.xml +./Marks/Solution1/pom.xml +./Marks/Solution2/pom.xml +./Navigation/V2/pom.xml +./NonsenseGenerator/pom.xml +./Prime/V1/pom.xml +./Prime/V2/pom.xml +./Projects/PoorMansGrep/pom.xml +./StringLengthSort/Solution/pom.xml +./SyncTest/pom.xml +./TicTacToe/V1/pom.xml +./TicTacToe/V2/pom.xml +./TicTacToe/V4/pom.xml +./Wc/readFile/pom.xml +./Wc/wc/pom.xml +./WordFrequency1/Solution/pom.xml +./WordFrequency2/Solution1/pom.xml +./WordFrequency2/Solution2/pom.xml +./Wordlist/Solution/pom.xml +./Wordlist/Solution2/pom.xml +./fraction/V05/pom.xml +./fraction/V1/pom.xml +./fraction/V2/pom.xml +./interest/V1/pom.xml +./interest/V2/pom.xml +./leapYear/pom.xml +./loop/answer/pom.xml +./loop/question/pom.xml +./math/V0_5/pom.xml +./math/V0_7/pom.xml +./math/V1/pom.xml +./math/V2/pom.xml +./math/V3/pom.xml +./math/V4/pom.xml +./plot/Basic/pom.xml +./plot/Interface/pom.xml +./rounding/pom.xml +./summing/V1/pom.xml +./summing/V2/pom.xml diff --git a/ws/Archetypes/mi-maven-archetype-quickstart/src/main/resources/archetype-resources/pom.xml b/ws/Archetypes/mi-maven-archetype-quickstart/src/main/resources/archetype-resources/pom.xml index 23ef54bd7aa78126d5e6a5ee71d909e7125313be..b3640b06d06d037bdd155ce14567282880d61233 100644 --- a/ws/Archetypes/mi-maven-archetype-quickstart/src/main/resources/archetype-resources/pom.xml +++ b/ws/Archetypes/mi-maven-archetype-quickstart/src/main/resources/archetype-resources/pom.xml @@ -1,87 +1,80 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> - <groupId>${groupId}</groupId> - <artifactId>${artifactId}</artifactId> - <version>${version}</version> - <packaging>jar</packaging> + <groupId>${groupId}</groupId> + <artifactId>${artifactId}</artifactId> + <version>${version}</version> + <packaging>jar</packaging> - <name>${artifactId}</name> + <name>${artifactId}</name> - <url>https://freedocs.mi.hdm-stuttgart.de/sd1SectToolsOfTheTrade2.html</url> + <url>https://freedocs.mi.hdm-stuttgart.de/sd1SectToolsOfTheTrade2.html</url> - <properties> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - </properties> + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> - <dependencies> - <dependency> - <groupId>org.junit.jupiter</groupId> - <artifactId>junit-jupiter-api</artifactId> - <version>5.1.0</version> - <scope>test</scope> - </dependency> + <dependencies> + <dependency> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter-api</artifactId> + <version>5.1.0</version> + <scope>test</scope> + </dependency> - <dependency> - <groupId>org.junit.jupiter</groupId> - <artifactId>junit-jupiter-engine</artifactId> - <version>5.1.0</version> - <scope>test</scope> - </dependency> + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-core</artifactId> + <version>2.11.0</version> + </dependency> - <dependency> - <groupId>org.apache.logging.log4j</groupId> - <artifactId>log4j-core</artifactId> - <version>2.11.0</version> - </dependency> + </dependencies> - </dependencies> + <build> + <plugins> - <build> - <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.7.0</version> + <configuration> + <source>1.8</source> + <target>1.8</target> + </configuration> + </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>3.7.0</version> - <configuration> - <source>1.8</source> - <target>1.8</target> - </configuration> - </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <version>3.0.0</version> + <configuration/> + </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-javadoc-plugin</artifactId> - <version>2.10.4</version> - <configuration /> - </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-shade-plugin</artifactId> + <version>3.1.0</version> + <configuration> + <transformers> + <transformer + implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> + <manifestEntries> + <Main-Class>${package}.App</Main-Class> + </manifestEntries> + </transformer> + </transformers> + </configuration> + <executions> + <execution> + <phase>package</phase> + <goals> + <goal>shade</goal> + </goals> + </execution> + </executions> + </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-shade-plugin</artifactId> - <version>3.1.0</version> - <configuration> - <transformers> - <transformer - implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> - <manifestEntries> - <Main-Class>${package}.App</Main-Class> - </manifestEntries> - </transformer> - </transformers> - </configuration> - <executions> - <execution> - <phase>package</phase> - <goals> - <goal>shade</goal> - </goals> - </execution> - </executions> - </plugin> - - </plugins> - </build> + </plugins> + </build> </project>