Skip to content

Commit 54572b9

Browse files
author
Grzegorz Piwowarek
committed
Rename mutation-testing -> testing
1 parent 93b4917 commit 54572b9

5 files changed

Lines changed: 127 additions & 127 deletions

File tree

‎pom.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858

5959
<module>mockito</module>
6060
<module>mocks</module>
61-
<module>mutation-testing</module>
61+
<module>testing</module>
6262

6363
<module>orika</module>
6464

File renamed without changes.
Lines changed: 77 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,77 @@
1-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3-
<modelVersion>4.0.0</modelVersion>
4-
<groupId>com.baeldung</groupId>
5-
<artifactId>mutation-testing</artifactId>
6-
<version>0.1-SNAPSHOT</version>
7-
<name>mutation-testing</name>
8-
<dependencies>
9-
<dependency>
10-
<groupId>org.pitest</groupId>
11-
<artifactId>pitest-parent</artifactId>
12-
<version>1.1.10</version>
13-
<type>pom</type>
14-
</dependency>
15-
<dependency>
16-
<groupId>junit</groupId>
17-
<artifactId>junit</artifactId>
18-
<version>4.9</version>
19-
</dependency>
20-
</dependencies>
21-
<build>
22-
<plugins>
23-
<plugin>
24-
<groupId>org.pitest</groupId>
25-
<artifactId>pitest-maven</artifactId>
26-
<version>1.1.10</version>
27-
<configuration>
28-
<targetClasses>
29-
<param>com.baeldung.testing.mutation.*</param>
30-
</targetClasses>
31-
<targetTests>
32-
<param>com.baeldung.mutation.test.*</param>
33-
</targetTests>
34-
</configuration>
35-
</plugin>
36-
<plugin>
37-
<groupId>org.jacoco</groupId>
38-
<artifactId>jacoco-maven-plugin</artifactId>
39-
<version>0.7.7.201606060606</version>
40-
<executions>
41-
<execution>
42-
<goals>
43-
<goal>prepare-agent</goal>
44-
</goals>
45-
</execution>
46-
<execution>
47-
<id>report</id>
48-
<phase>prepare-package</phase>
49-
<goals>
50-
<goal>report</goal>
51-
</goals>
52-
</execution>
53-
<execution>
54-
<id>jacoco-check</id>
55-
<goals>
56-
<goal>check</goal>
57-
</goals>
58-
<configuration>
59-
<rules>
60-
<rule>
61-
<element>PACKAGE</element>
62-
<limits>
63-
<limit>
64-
<counter>LINE</counter>
65-
<value>COVEREDRATIO</value>
66-
<minimum>0.50</minimum>
67-
</limit>
68-
</limits>
69-
</rule>
70-
</rules>
71-
</configuration>
72-
</execution>
73-
</executions>
74-
</plugin>
75-
</plugins>
76-
</build>
77-
</project>
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>com.baeldung</groupId>
5+
<artifactId>mutation-testing</artifactId>
6+
<version>0.1-SNAPSHOT</version>
7+
<name>mutation-testing</name>
8+
<dependencies>
9+
<dependency>
10+
<groupId>org.pitest</groupId>
11+
<artifactId>pitest-parent</artifactId>
12+
<version>1.1.10</version>
13+
<type>pom</type>
14+
</dependency>
15+
<dependency>
16+
<groupId>junit</groupId>
17+
<artifactId>junit</artifactId>
18+
<version>4.9</version>
19+
</dependency>
20+
</dependencies>
21+
<build>
22+
<plugins>
23+
<plugin>
24+
<groupId>org.pitest</groupId>
25+
<artifactId>pitest-maven</artifactId>
26+
<version>1.1.10</version>
27+
<configuration>
28+
<targetClasses>
29+
<param>com.baeldung.testing.mutation.*</param>
30+
</targetClasses>
31+
<targetTests>
32+
<param>com.baeldung.mutation.test.*</param>
33+
</targetTests>
34+
</configuration>
35+
</plugin>
36+
<plugin>
37+
<groupId>org.jacoco</groupId>
38+
<artifactId>jacoco-maven-plugin</artifactId>
39+
<version>0.7.7.201606060606</version>
40+
<executions>
41+
<execution>
42+
<goals>
43+
<goal>prepare-agent</goal>
44+
</goals>
45+
</execution>
46+
<execution>
47+
<id>report</id>
48+
<phase>prepare-package</phase>
49+
<goals>
50+
<goal>report</goal>
51+
</goals>
52+
</execution>
53+
<execution>
54+
<id>jacoco-check</id>
55+
<goals>
56+
<goal>check</goal>
57+
</goals>
58+
<configuration>
59+
<rules>
60+
<rule>
61+
<element>PACKAGE</element>
62+
<limits>
63+
<limit>
64+
<counter>LINE</counter>
65+
<value>COVEREDRATIO</value>
66+
<minimum>0.50</minimum>
67+
</limit>
68+
</limits>
69+
</rule>
70+
</rules>
71+
</configuration>
72+
</execution>
73+
</executions>
74+
</plugin>
75+
</plugins>
76+
</build>
77+
</project>

mutation-testing/src/main/java/com/baeldung/testing/mutation/Palindrome.java renamed to testing/src/main/java/com/baeldung/testing/mutation/Palindrome.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
package com.baeldung.testing.mutation;
2-
3-
public class Palindrome {
4-
5-
public boolean isPalindrome(String inputString) {
6-
if (inputString.length() == 0) {
7-
return true;
8-
} else {
9-
char firstChar = inputString.charAt(0);
10-
char lastChar = inputString.charAt(inputString.length() - 1);
11-
String mid = inputString.substring(1, inputString.length() - 1);
12-
return (firstChar == lastChar) && isPalindrome(mid);
13-
}
14-
}
15-
}
1+
package com.baeldung.testing.mutation;
2+
3+
public class Palindrome {
4+
5+
public boolean isPalindrome(String inputString) {
6+
if (inputString.length() == 0) {
7+
return true;
8+
} else {
9+
char firstChar = inputString.charAt(0);
10+
char lastChar = inputString.charAt(inputString.length() - 1);
11+
String mid = inputString.substring(1, inputString.length() - 1);
12+
return (firstChar == lastChar) && isPalindrome(mid);
13+
}
14+
}
15+
}

mutation-testing/src/test/java/com/baeldung/mutation/test/TestPalindrome.java renamed to testing/src/test/java/com/baeldung/mutation/test/TestPalindrome.java

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
1-
package com.baeldung.mutation.test;
2-
3-
import static org.junit.Assert.assertFalse;
4-
import static org.junit.Assert.assertTrue;
5-
6-
import org.junit.Test;
7-
8-
import com.baeldung.testing.mutation.Palindrome;
9-
10-
public class TestPalindrome {
11-
@Test
12-
public void whenEmptyString_thanAccept() {
13-
Palindrome palindromeTester = new Palindrome();
14-
assertTrue(palindromeTester.isPalindrome("noon"));
15-
}
16-
17-
@Test
18-
public void whenPalindrom_thanAccept() {
19-
Palindrome palindromeTester = new Palindrome();
20-
assertTrue(palindromeTester.isPalindrome("noon"));
21-
}
22-
23-
@Test
24-
public void whenNotPalindrom_thanReject(){
25-
Palindrome palindromeTester = new Palindrome();
26-
assertFalse(palindromeTester.isPalindrome("box"));
27-
}
28-
29-
@Test
30-
public void whenNearPalindrom_thanReject(){
31-
Palindrome palindromeTester = new Palindrome();
32-
assertFalse(palindromeTester.isPalindrome("neon"));
33-
}
34-
}
1+
package com.baeldung.mutation.test;
2+
3+
import static org.junit.Assert.assertFalse;
4+
import static org.junit.Assert.assertTrue;
5+
6+
import org.junit.Test;
7+
8+
import com.baeldung.testing.mutation.Palindrome;
9+
10+
public class TestPalindrome {
11+
@Test
12+
public void whenEmptyString_thanAccept() {
13+
Palindrome palindromeTester = new Palindrome();
14+
assertTrue(palindromeTester.isPalindrome("noon"));
15+
}
16+
17+
@Test
18+
public void whenPalindrom_thanAccept() {
19+
Palindrome palindromeTester = new Palindrome();
20+
assertTrue(palindromeTester.isPalindrome("noon"));
21+
}
22+
23+
@Test
24+
public void whenNotPalindrom_thanReject(){
25+
Palindrome palindromeTester = new Palindrome();
26+
assertFalse(palindromeTester.isPalindrome("box"));
27+
}
28+
29+
@Test
30+
public void whenNearPalindrom_thanReject(){
31+
Palindrome palindromeTester = new Palindrome();
32+
assertFalse(palindromeTester.isPalindrome("neon"));
33+
}
34+
}

0 commit comments

Comments
 (0)