Skip to content

Commit b2818e4

Browse files
authored
Update JUnit to 4.13 and add default dependency on AssertJ. (exercism#1824)
* Update JUnit to 4.13 and add default dependency on AssertJ. * Fix style issueswith tests and initial implementations.
1 parent 913b3d3 commit b2818e4

File tree

129 files changed

+266
-223
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+266
-223
lines changed

_template/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ repositories {
77
}
88

99
dependencies {
10-
testCompile "junit:junit:4.12"
10+
testCompile "junit:junit:4.13"
11+
testImplementation "org.assertj:assertj-core:3.15.0"
1112
}
1213

1314
test {

exercises/accumulate/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ repositories {
77
}
88

99
dependencies {
10-
testCompile "junit:junit:4.12"
10+
testCompile "junit:junit:4.13"
11+
testImplementation "org.assertj:assertj-core:3.15.0"
1112
}
1213

1314
test {

exercises/acronym/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ repositories {
77
}
88

99
dependencies {
10-
testCompile "junit:junit:4.12"
10+
testCompile "junit:junit:4.13"
11+
testImplementation "org.assertj:assertj-core:3.15.0"
1112
}
1213

1314
test {

exercises/affine-cipher/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ repositories {
77
}
88

99
dependencies {
10-
testCompile "junit:junit:4.12"
10+
testCompile "junit:junit:4.13"
11+
testImplementation "org.assertj:assertj-core:3.15.0"
1112
}
1213

1314
test {

exercises/all-your-base/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ repositories {
77
}
88

99
dependencies {
10-
testCompile "junit:junit:4.12"
10+
testCompile "junit:junit:4.13"
11+
testImplementation "org.assertj:assertj-core:3.15.0"
1112
}
1213

1314
test {

exercises/allergies/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ repositories {
77
}
88

99
dependencies {
10-
testCompile "junit:junit:4.12"
10+
testCompile "junit:junit:4.13"
11+
testImplementation "org.assertj:assertj-core:3.15.0"
1112
}
1213

1314
test {

exercises/alphametics/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ repositories {
77
}
88

99
dependencies {
10-
testCompile "junit:junit:4.12"
10+
testCompile "junit:junit:4.13"
11+
testImplementation "org.assertj:assertj-core:3.15.0"
1112
}
1213

1314
test {

exercises/anagram/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ repositories {
77
}
88

99
dependencies {
10-
testCompile "junit:junit:4.12"
10+
testCompile "junit:junit:4.13"
1111
testImplementation "org.assertj:assertj-core:3.15.0"
1212
}
1313

exercises/anagram/src/test/java/AnagramTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
import java.util.Arrays;
77
import java.util.Collections;
8-
import java.util.List;
98

109
public class AnagramTest {
1110

exercises/armstrong-numbers/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ repositories {
77
}
88

99
dependencies {
10-
testCompile "junit:junit:4.12"
10+
testCompile "junit:junit:4.13"
11+
testImplementation "org.assertj:assertj-core:3.15.0"
1112
}
1213

1314
test {
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
class ArmstrongNumbers {
22

3-
boolean isArmstrongNumber(int numberToCheck) {
3+
boolean isArmstrongNumber(int numberToCheck) {
44

5-
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
6-
7-
}
5+
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
6+
7+
}
88

99
}

exercises/atbash-cipher/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ repositories {
77
}
88

99
dependencies {
10-
testCompile "junit:junit:4.12"
10+
testCompile "junit:junit:4.13"
11+
testImplementation "org.assertj:assertj-core:3.15.0"
1112
}
1213

1314
test {

exercises/bank-account/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ repositories {
77
}
88

99
dependencies {
10-
testCompile "junit:junit:4.12"
10+
testCompile "junit:junit:4.13"
11+
testImplementation "org.assertj:assertj-core:3.15.0"
1112
}
1213

1314
test {

exercises/beer-song/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ repositories {
77
}
88

99
dependencies {
10-
testCompile "junit:junit:4.12"
10+
testCompile "junit:junit:4.13"
11+
testImplementation "org.assertj:assertj-core:3.15.0"
1112
}
1213

1314
test {

exercises/binary-search-tree/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ repositories {
77
}
88

99
dependencies {
10-
testCompile "junit:junit:4.12"
10+
testCompile "junit:junit:4.13"
11+
testImplementation "org.assertj:assertj-core:3.15.0"
1112
}
1213

1314
test {

exercises/binary-search/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ repositories {
77
}
88

99
dependencies {
10-
testCompile "junit:junit:4.12"
10+
testCompile "junit:junit:4.13"
11+
testImplementation "org.assertj:assertj-core:3.15.0"
1112
}
1213

1314
test {

exercises/binary/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ repositories {
77
}
88

99
dependencies {
10-
testCompile "junit:junit:4.12"
10+
testCompile "junit:junit:4.13"
11+
testImplementation "org.assertj:assertj-core:3.15.0"
1112
}
1213

1314
test {

exercises/bob/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ repositories {
77
}
88

99
dependencies {
10-
testCompile "junit:junit:4.12"
10+
testCompile "junit:junit:4.13"
11+
testImplementation "org.assertj:assertj-core:3.15.0"
1112
}
1213

1314
test {

exercises/book-store/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ repositories {
77
}
88

99
dependencies {
10-
testCompile "junit:junit:4.12"
10+
testCompile "junit:junit:4.13"
11+
testImplementation "org.assertj:assertj-core:3.15.0"
1112
}
1213

1314
test {

exercises/bowling/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ repositories {
77
}
88

99
dependencies {
10-
testCompile "junit:junit:4.12"
10+
testCompile "junit:junit:4.13"
11+
testImplementation "org.assertj:assertj-core:3.15.0"
1112
}
1213

1314
test {

exercises/change/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ repositories {
77
}
88

99
dependencies {
10-
testCompile "junit:junit:4.12"
10+
testCompile "junit:junit:4.13"
11+
testImplementation "org.assertj:assertj-core:3.15.0"
1112
}
1213

1314
test {

exercises/circular-buffer/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ repositories {
77
}
88

99
dependencies {
10-
testCompile "junit:junit:4.12"
11-
testImplementation "org.assertj:assertj-core:3.15.0"
10+
testCompile "junit:junit:4.13"
11+
testImplementation "org.assertj:assertj-core:3.15.0"
1212
}
1313

1414
test {

exercises/clock/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ repositories {
77
}
88

99
dependencies {
10-
testCompile "junit:junit:4.12"
10+
testCompile "junit:junit:4.13"
11+
testImplementation "org.assertj:assertj-core:3.15.0"
1112
}
1213

1314
test {

exercises/collatz-conjecture/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ repositories {
77
}
88

99
dependencies {
10-
testCompile "junit:junit:4.12"
10+
testCompile "junit:junit:4.13"
11+
testImplementation "org.assertj:assertj-core:3.15.0"
1112
}
1213

1314
test {

exercises/complex-numbers/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ repositories {
77
}
88

99
dependencies {
10-
testCompile "junit:junit:4.12"
10+
testCompile "junit:junit:4.13"
11+
testImplementation "org.assertj:assertj-core:3.15.0"
1112
}
1213

1314
test {

exercises/crypto-square/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ repositories {
77
}
88

99
dependencies {
10-
testCompile "junit:junit:4.12"
10+
testCompile "junit:junit:4.13"
11+
testImplementation "org.assertj:assertj-core:3.15.0"
1112
}
1213

1314
test {

exercises/custom-set/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ repositories {
77
}
88

99
dependencies {
10-
testCompile "junit:junit:4.12"
10+
testCompile "junit:junit:4.13"
11+
testImplementation "org.assertj:assertj-core:3.15.0"
1112
}
1213

1314
test {

exercises/darts/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ repositories {
77
}
88

99
dependencies {
10-
testCompile "junit:junit:4.12"
10+
testCompile "junit:junit:4.13"
11+
testImplementation "org.assertj:assertj-core:3.15.0"
1112
}
1213

1314
test {

exercises/diamond/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ repositories {
77
}
88

99
dependencies {
10-
testCompile "junit:junit:4.12"
10+
testCompile "junit:junit:4.13"
1111
testImplementation "org.assertj:assertj-core:3.15.0"
1212
}
1313

exercises/diamond/src/test/java/DiamondPrinterTest.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
import org.junit.Before;
55
import org.junit.Test;
66

7-
import java.util.List;
8-
97
public class DiamondPrinterTest {
108

119
private DiamondPrinter diamondPrinter;

exercises/difference-of-squares/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ repositories {
77
}
88

99
dependencies {
10-
testCompile "junit:junit:4.12"
10+
testCompile "junit:junit:4.13"
11+
testImplementation "org.assertj:assertj-core:3.15.0"
1112
}
1213

1314
test {

exercises/diffie-hellman/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ repositories {
77
}
88

99
dependencies {
10-
testCompile "junit:junit:4.12"
10+
testCompile "junit:junit:4.13"
11+
testImplementation "org.assertj:assertj-core:3.15.0"
1112
}
1213

1314
test {

exercises/dnd-character/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ repositories {
77
}
88

99
dependencies {
10-
testCompile "junit:junit:4.12"
10+
testCompile "junit:junit:4.13"
11+
testImplementation "org.assertj:assertj-core:3.15.0"
1112
}
1213

1314
test {

exercises/dominoes/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ repositories {
77
}
88

99
dependencies {
10-
testCompile "junit:junit:4.12"
10+
testCompile "junit:junit:4.13"
11+
testImplementation "org.assertj:assertj-core:3.15.0"
1112
}
1213

1314
test {
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
class ChainNotFoundException extends Exception {
2-
public ChainNotFoundException(String message) {
3-
super(message);
4-
}
2+
public ChainNotFoundException(String message) {
3+
super(message);
4+
}
55
}

exercises/dominoes/src/main/java/Domino.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,22 @@ class Domino {
99
}
1010

1111
int getLeft() {
12-
return this.left;
12+
return this.left;
1313
}
1414

1515
int getRight() {
16-
return this.right;
16+
return this.right;
1717
}
1818

1919
@Override
2020
public boolean equals(Object o) {
21-
Domino otherDomino = (Domino) o;
22-
return (this.getLeft() == otherDomino.getLeft() && this.getRight() == otherDomino.getRight()) ||
23-
(this.getLeft() == otherDomino.getRight() && this.getRight() == otherDomino.getLeft());
21+
Domino otherDomino = (Domino) o;
22+
return (this.getLeft() == otherDomino.getLeft() && this.getRight() == otherDomino.getRight()) ||
23+
(this.getLeft() == otherDomino.getRight() && this.getRight() == otherDomino.getLeft());
2424
}
2525

2626
@Override
2727
public int hashCode() {
28-
return Objects.hash(left, right);
28+
return Objects.hash(left, right);
2929
}
3030
}

exercises/error-handling/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ repositories {
77
}
88

99
dependencies {
10-
testCompile "junit:junit:4.12"
10+
testCompile "junit:junit:4.13"
11+
testImplementation "org.assertj:assertj-core:3.15.0"
1112
}
1213

1314
test {

exercises/etl/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ repositories {
77
}
88

99
dependencies {
10-
testCompile "junit:junit:4.12"
10+
testCompile "junit:junit:4.13"
11+
testImplementation "org.assertj:assertj-core:3.15.0"
1112
}
1213

1314
test {

0 commit comments

Comments
 (0)