diff --git a/pom.xml b/pom.xml index e97093b7f7..514d066844 100644 --- a/pom.xml +++ b/pom.xml @@ -58,7 +58,7 @@ mockito mocks - mutation-testing + testing orika diff --git a/mutation-testing/README.md b/testing/README.md similarity index 100% rename from mutation-testing/README.md rename to testing/README.md diff --git a/mutation-testing/pom.xml b/testing/pom.xml similarity index 97% rename from mutation-testing/pom.xml rename to testing/pom.xml index cdee59fcb4..aa523d95ef 100644 --- a/mutation-testing/pom.xml +++ b/testing/pom.xml @@ -1,77 +1,77 @@ - - 4.0.0 - com.baeldung - mutation-testing - 0.1-SNAPSHOT - mutation-testing - - - org.pitest - pitest-parent - 1.1.10 - pom - - - junit - junit - 4.9 - - - - - - org.pitest - pitest-maven - 1.1.10 - - - com.baeldung.testing.mutation.* - - - com.baeldung.mutation.test.* - - - - - org.jacoco - jacoco-maven-plugin - 0.7.7.201606060606 - - - - prepare-agent - - - - report - prepare-package - - report - - - - jacoco-check - - check - - - - - PACKAGE - - - LINE - COVEREDRATIO - 0.50 - - - - - - - - - - - + + 4.0.0 + com.baeldung + mutation-testing + 0.1-SNAPSHOT + mutation-testing + + + org.pitest + pitest-parent + 1.1.10 + pom + + + junit + junit + 4.9 + + + + + + org.pitest + pitest-maven + 1.1.10 + + + com.baeldung.testing.mutation.* + + + com.baeldung.mutation.test.* + + + + + org.jacoco + jacoco-maven-plugin + 0.7.7.201606060606 + + + + prepare-agent + + + + report + prepare-package + + report + + + + jacoco-check + + check + + + + + PACKAGE + + + LINE + COVEREDRATIO + 0.50 + + + + + + + + + + + diff --git a/mutation-testing/src/main/java/com/baeldung/testing/mutation/Palindrome.java b/testing/src/main/java/com/baeldung/testing/mutation/Palindrome.java similarity index 97% rename from mutation-testing/src/main/java/com/baeldung/testing/mutation/Palindrome.java rename to testing/src/main/java/com/baeldung/testing/mutation/Palindrome.java index 0b166f1557..e264a4c759 100644 --- a/mutation-testing/src/main/java/com/baeldung/testing/mutation/Palindrome.java +++ b/testing/src/main/java/com/baeldung/testing/mutation/Palindrome.java @@ -1,15 +1,15 @@ -package com.baeldung.testing.mutation; - -public class Palindrome { - - public boolean isPalindrome(String inputString) { - if (inputString.length() == 0) { - return true; - } else { - char firstChar = inputString.charAt(0); - char lastChar = inputString.charAt(inputString.length() - 1); - String mid = inputString.substring(1, inputString.length() - 1); - return (firstChar == lastChar) && isPalindrome(mid); - } - } -} +package com.baeldung.testing.mutation; + +public class Palindrome { + + public boolean isPalindrome(String inputString) { + if (inputString.length() == 0) { + return true; + } else { + char firstChar = inputString.charAt(0); + char lastChar = inputString.charAt(inputString.length() - 1); + String mid = inputString.substring(1, inputString.length() - 1); + return (firstChar == lastChar) && isPalindrome(mid); + } + } +} diff --git a/mutation-testing/src/test/java/com/baeldung/mutation/test/TestPalindrome.java b/testing/src/test/java/com/baeldung/mutation/test/TestPalindrome.java similarity index 96% rename from mutation-testing/src/test/java/com/baeldung/mutation/test/TestPalindrome.java rename to testing/src/test/java/com/baeldung/mutation/test/TestPalindrome.java index 3add6290f6..11ed966b16 100644 --- a/mutation-testing/src/test/java/com/baeldung/mutation/test/TestPalindrome.java +++ b/testing/src/test/java/com/baeldung/mutation/test/TestPalindrome.java @@ -1,34 +1,34 @@ -package com.baeldung.mutation.test; - -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - -import org.junit.Test; - -import com.baeldung.testing.mutation.Palindrome; - -public class TestPalindrome { - @Test - public void whenEmptyString_thanAccept() { - Palindrome palindromeTester = new Palindrome(); - assertTrue(palindromeTester.isPalindrome("noon")); - } - - @Test - public void whenPalindrom_thanAccept() { - Palindrome palindromeTester = new Palindrome(); - assertTrue(palindromeTester.isPalindrome("noon")); - } - - @Test - public void whenNotPalindrom_thanReject(){ - Palindrome palindromeTester = new Palindrome(); - assertFalse(palindromeTester.isPalindrome("box")); - } - - @Test - public void whenNearPalindrom_thanReject(){ - Palindrome palindromeTester = new Palindrome(); - assertFalse(palindromeTester.isPalindrome("neon")); - } -} +package com.baeldung.mutation.test; + +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +import com.baeldung.testing.mutation.Palindrome; + +public class TestPalindrome { + @Test + public void whenEmptyString_thanAccept() { + Palindrome palindromeTester = new Palindrome(); + assertTrue(palindromeTester.isPalindrome("noon")); + } + + @Test + public void whenPalindrom_thanAccept() { + Palindrome palindromeTester = new Palindrome(); + assertTrue(palindromeTester.isPalindrome("noon")); + } + + @Test + public void whenNotPalindrom_thanReject(){ + Palindrome palindromeTester = new Palindrome(); + assertFalse(palindromeTester.isPalindrome("box")); + } + + @Test + public void whenNearPalindrom_thanReject(){ + Palindrome palindromeTester = new Palindrome(); + assertFalse(palindromeTester.isPalindrome("neon")); + } +}