Skip to content

Commit 2110550

Browse files
stkentjtigger
authored andcommitted
Ensure that tests compile as-is before stripping annotations (exercism#408)
+ bookstore: add missing import statement in tests
1 parent 5c8de88 commit 2110550

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

‎bin/journey-test.sh‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,8 @@ solve_all_exercises() {
225225
cp -R -H ${xjava}/exercises/${exercise}/src/example/java/* ${exercism_exercises_dir}/java/${exercise}/src/main/java/
226226

227227
pushd ${exercism_exercises_dir}/java/${exercise}
228+
# Check that tests compile before we strip @Ignore annotations
229+
gradle compileTestJava
228230
# Ensure we run all the tests (as delivered, all but the first is @Ignore'd)
229231
for testfile in `find . -name "*Test.java"`; do
230232
sed 's/@Ignore//' ${testfile} > "${tempfile}" && mv "${tempfile}" "${testfile}"

‎exercises/book-store/src/test/java/BookstoreTest.java‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import java.util.ArrayList;
55
import java.util.Arrays;
66

7+
import org.junit.Ignore;
78
import org.junit.Test;
89

910
public class BookstoreTest{

0 commit comments

Comments
 (0)