Просмотр исходного кода

Ensure that tests compile as-is before stripping annotations (#408)

+ bookstore: add missing import statement in tests
Stuart Kent 9 лет назад
Родитель
Сommit
2110550ec9
2 измененных файлов: 3 добавлений и 0 удалений
  1. 2
    0
      bin/journey-test.sh
  2. 1
    0
      exercises/book-store/src/test/java/BookstoreTest.java

+ 2
- 0
bin/journey-test.sh Просмотреть файл

225
     cp -R -H ${xjava}/exercises/${exercise}/src/example/java/* ${exercism_exercises_dir}/java/${exercise}/src/main/java/
225
     cp -R -H ${xjava}/exercises/${exercise}/src/example/java/* ${exercism_exercises_dir}/java/${exercise}/src/main/java/
226
 
226
 
227
     pushd ${exercism_exercises_dir}/java/${exercise}
227
     pushd ${exercism_exercises_dir}/java/${exercise}
228
+    # Check that tests compile before we strip @Ignore annotations
229
+    gradle compileTestJava
228
     # Ensure we run all the tests (as delivered, all but the first is @Ignore'd)
230
     # Ensure we run all the tests (as delivered, all but the first is @Ignore'd)
229
     for testfile in `find . -name "*Test.java"`; do
231
     for testfile in `find . -name "*Test.java"`; do
230
       sed 's/@Ignore//' ${testfile} > "${tempfile}" && mv "${tempfile}" "${testfile}"
232
       sed 's/@Ignore//' ${testfile} > "${tempfile}" && mv "${tempfile}" "${testfile}"

+ 1
- 0
exercises/book-store/src/test/java/BookstoreTest.java Просмотреть файл

4
 import java.util.ArrayList;
4
 import java.util.ArrayList;
5
 import java.util.Arrays;
5
 import java.util.Arrays;
6
 
6
 
7
+import org.junit.Ignore;
7
 import org.junit.Test;
8
 import org.junit.Test;
8
 
9
 
9
 public class BookstoreTest{
10
 public class BookstoreTest{