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

Merge remote-tracking branch 'upstream/master'

Stuart Kent 9 лет назад
Родитель
Сommit
146add2a78
4 измененных файлов: 178 добавлений и 157 удалений
  1. 48
    47
      config.json
  2. 76
    68
      docs/INSTALLATION.md
  3. 47
    41
      docs/TESTS.md
  4. 7
    1
      exercises/bob/src/test/java/BobTest.java

+ 48
- 47
config.json Просмотреть файл

@@ -1,6 +1,7 @@
1 1
 {
2 2
   "language": "Java",
3 3
   "active": true,
4
+  "blurb": "Java is a very widely used Object Oriented programming language. It's safe, simple to use and portable so that you can \"write once, run anywhere\".",
4 5
   "exercises": [
5 6
     {
6 7
       "uuid": "f77dc7e3-35a8-4300-a7c8-2c1765e9644d",
@@ -96,7 +97,7 @@
96 97
       "uuid": "d916e4f8-fda1-41c0-ab24-79e8fc3f1272",
97 98
       "slug": "raindrops",
98 99
       "core": false,
99
-      "unlocked_by": "two-fer",
100
+      "unlocked_by": "hello-world",
100 101
       "difficulty": 3,
101 102
       "topics": [
102 103
 
@@ -136,7 +137,7 @@
136 137
       "uuid": "2f244afc-3e7b-4f89-92af-e2b427f4ef35",
137 138
       "slug": "sum-of-multiples",
138 139
       "core": false,
139
-      "unlocked_by": "perfect-numbers",
140
+      "unlocked_by": "difference-of-squares",
140 141
       "difficulty": 4,
141 142
       "topics": [
142 143
 
@@ -176,7 +177,7 @@
176 177
       "uuid": "b7310b6e-435c-4d5f-b2bd-31e586d0f238",
177 178
       "slug": "largest-series-product",
178 179
       "core": false,
179
-      "unlocked_by": "luhn",
180
+      "unlocked_by": "hamming",
180 181
       "difficulty": 4,
181 182
       "topics": [
182 183
 
@@ -186,7 +187,7 @@
186 187
       "uuid": "6791d01f-bae4-4b63-ae76-86529ac49e36",
187 188
       "slug": "sieve",
188 189
       "core": false,
189
-      "unlocked_by": "sum-of-multiples",
190
+      "unlocked_by": "difference-of-squares",
190 191
       "difficulty": 4,
191 192
       "topics": [
192 193
 
@@ -196,7 +197,7 @@
196 197
       "uuid": "581afdbb-dfb6-4dc5-9554-a025b5469a3c",
197 198
       "slug": "twelve-days",
198 199
       "core": false,
199
-      "unlocked_by": "raindrops",
200
+      "unlocked_by": "two-fer",
200 201
       "difficulty": 4,
201 202
       "topics": [
202 203
 
@@ -236,7 +237,7 @@
236 237
       "uuid": "2c69db99-648d-4bd7-8012-1fbdeff6ca0a",
237 238
       "slug": "nth-prime",
238 239
       "core": false,
239
-      "unlocked_by": "collatz-conjecture",
240
+      "unlocked_by": "triangle",
240 241
       "difficulty": 4,
241 242
       "topics": [
242 243
 
@@ -256,7 +257,7 @@
256 257
       "uuid": "ecbd997b-86f4-4e11-9ff0-706ac2899415",
257 258
       "slug": "diamond",
258 259
       "core": false,
259
-      "unlocked_by": "twelve-days",
260
+      "unlocked_by": "two-fer",
260 261
       "difficulty": 4,
261 262
       "topics": [
262 263
 
@@ -266,7 +267,7 @@
266 267
       "uuid": "c3e89c7c-3a8a-4ddc-b653-9b0ff9e1d7d8",
267 268
       "slug": "isogram",
268 269
       "core": false,
269
-      "unlocked_by": "pangram",
270
+      "unlocked_by": "hello-world",
270 271
       "difficulty": 4,
271 272
       "topics": [
272 273
 
@@ -286,7 +287,7 @@
286 287
       "uuid": "38bc80ae-d842-4c04-a797-48edf322504d",
287 288
       "slug": "pig-latin",
288 289
       "core": false,
289
-      "unlocked_by": "rna-transcription",
290
+      "unlocked_by": "hello-world",
290 291
       "difficulty": 5,
291 292
       "topics": [
292 293
 
@@ -296,7 +297,7 @@
296 297
       "uuid": "5f9139e7-9fbb-496a-a0d7-a946283033de",
297 298
       "slug": "phone-number",
298 299
       "core": false,
299
-      "unlocked_by": "largest-series-product",
300
+      "unlocked_by": "hamming",
300 301
       "difficulty": 5,
301 302
       "topics": [
302 303
 
@@ -306,7 +307,7 @@
306 307
       "uuid": "2d80fdfc-5bd7-4b67-9fbe-8ab820d89051",
307 308
       "slug": "nucleotide-count",
308 309
       "core": false,
309
-      "unlocked_by": "phone-number",
310
+      "unlocked_by": "hamming",
310 311
       "difficulty": 5,
311 312
       "topics": [
312 313
 
@@ -346,7 +347,7 @@
346 347
       "uuid": "599c08ec-7338-46ed-99f8-a76f78f724e6",
347 348
       "slug": "prime-factors",
348 349
       "core": false,
349
-      "unlocked_by": "nth-prime",
350
+      "unlocked_by": "triangle",
350 351
       "difficulty": 5,
351 352
       "topics": [
352 353
 
@@ -356,7 +357,7 @@
356 357
       "uuid": "6a617ddb-04e3-451c-bb30-27ccd0be9125",
357 358
       "slug": "allergies",
358 359
       "core": false,
359
-      "unlocked_by": "secret-handshake",
360
+      "unlocked_by": "gigasecond",
360 361
       "difficulty": 5,
361 362
       "topics": [
362 363
 
@@ -366,7 +367,7 @@
366 367
       "uuid": "34cd328c-cd96-492b-abd4-2b8716cdcd9a",
367 368
       "slug": "bob",
368 369
       "core": false,
369
-      "unlocked_by": "diamond",
370
+      "unlocked_by": "two-fer",
370 371
       "difficulty": 5,
371 372
       "topics": [
372 373
 
@@ -376,7 +377,7 @@
376 377
       "uuid": "d2a76905-1c8c-4b03-b4f7-4fbff19329f3",
377 378
       "slug": "pascals-triangle",
378 379
       "core": false,
379
-      "unlocked_by": "kindergarten-garden",
380
+      "unlocked_by": "matrix",
380 381
       "difficulty": 5,
381 382
       "topics": [
382 383
 
@@ -396,7 +397,7 @@
396 397
       "uuid": "af80d7f4-c7d0-4d0b-9c30-09da120f6bb9",
397 398
       "slug": "series",
398 399
       "core": false,
399
-      "unlocked_by": "nucleotide-count",
400
+      "unlocked_by": "hamming",
400 401
       "difficulty": 5,
401 402
       "topics": [
402 403
 
@@ -406,7 +407,7 @@
406 407
       "uuid": "d36ce010-210f-4e9a-9d6c-cb933e0a59af",
407 408
       "slug": "atbash-cipher",
408 409
       "core": false,
409
-      "unlocked_by": "run-length-encoding",
410
+      "unlocked_by": "rotational-cipher",
410 411
       "difficulty": 5,
411 412
       "topics": [
412 413
 
@@ -416,7 +417,7 @@
416 417
       "uuid": "163fcc6b-c054-4232-a88b-0aded846a6eb",
417 418
       "slug": "spiral-matrix",
418 419
       "core": false,
419
-      "unlocked_by": "pascals-triangle",
420
+      "unlocked_by": "matrix",
420 421
       "difficulty": 6,
421 422
       "topics": [
422 423
 
@@ -426,7 +427,7 @@
426 427
       "uuid": "3e728cd4-5e5f-4c69-8a53-bc36d020fcdb",
427 428
       "slug": "roman-numerals",
428 429
       "core": false,
429
-      "unlocked_by": "series",
430
+      "unlocked_by": "hamming",
430 431
       "difficulty": 6,
431 432
       "topics": [
432 433
 
@@ -436,7 +437,7 @@
436 437
       "uuid": "57b76837-4610-466f-9373-d5c2697625f1",
437 438
       "slug": "transpose",
438 439
       "core": false,
439
-      "unlocked_by": "spiral-matrix",
440
+      "unlocked_by": "matrix",
440 441
       "difficulty": 6,
441 442
       "topics": [
442 443
 
@@ -446,7 +447,7 @@
446 447
       "uuid": "6b51aca3-3451-4a64-ad7b-00b151d7548a",
447 448
       "slug": "house",
448 449
       "core": false, 
449
-      "unlocked_by": "bob",
450
+      "unlocked_by": "two-fer",
450 451
       "difficulty": 6,
451 452
       "topics": [
452 453
 
@@ -456,7 +457,7 @@
456 457
       "uuid": "dd3e6fd6-5359-4978-acd7-c39374cead4d",
457 458
       "slug": "food-chain",
458 459
       "core": false,
459
-      "unlocked_by": "house",
460
+      "unlocked_by": "two-fer",
460 461
       "difficulty": 6,
461 462
       "topics": [
462 463
 
@@ -466,7 +467,7 @@
466 467
       "uuid": "56943095-de76-40bf-b42b-fa3e70f8df5e",
467 468
       "slug": "beer-song",
468 469
       "core": false,
469
-      "unlocked_by": "food-chain",
470
+      "unlocked_by": "two-fer",
470 471
       "difficulty": 6,
471 472
       "topics": [
472 473
 
@@ -506,7 +507,7 @@
506 507
       "uuid": "b4af5da1-601f-4b0f-bfb8-4a381851090c",
507 508
       "slug": "grade-school",
508 509
       "core": false,
509
-      "unlocked_by": "etl",
510
+      "unlocked_by": "word-count",
510 511
       "difficulty": 6,
511 512
       "topics": [
512 513
 
@@ -516,7 +517,7 @@
516 517
       "uuid": "993bde9d-7774-4e7a-a381-9eee75f28ecb",
517 518
       "slug": "robot-simulator",
518 519
       "core": false,
519
-      "unlocked_by": "allergies",
520
+      "unlocked_by": "secret-handshake",
520 521
       "difficulty": 6,
521 522
       "topics": [
522 523
 
@@ -536,7 +537,7 @@
536 537
       "uuid": "416a1489-12af-4593-8540-0f55285c96b4",
537 538
       "slug": "minesweeper",
538 539
       "core": false,
539
-      "unlocked_by": "queen-attack",
540
+      "unlocked_by": "scrabble-score",
540 541
       "difficulty": 6,
541 542
       "topics": [
542 543
 
@@ -546,7 +547,7 @@
546 547
       "uuid": "3310a3cd-c0cb-45fa-8c51-600178be904a",
547 548
       "slug": "wordy",
548 549
       "core": false,
549
-      "unlocked_by": "robot-simulator",
550
+      "unlocked_by": "secret-handshake",
550 551
       "difficulty": 6,
551 552
       "topics": [
552 553
 
@@ -556,7 +557,7 @@
556 557
       "uuid": "f7c2e4b5-1995-4dfe-b827-c9aff8ac5332",
557 558
       "slug": "all-your-base",
558 559
       "core": false,
559
-      "unlocked_by": "sieve",
560
+      "unlocked_by": "saddle-points",
560 561
       "difficulty": 6,
561 562
       "topics": [
562 563
 
@@ -576,7 +577,7 @@
576 577
       "uuid": "4b3f7771-c642-4278-a3d9-2fb958f26361",
577 578
       "slug": "bowling",
578 579
       "core": false,
579
-      "unlocked_by": "minesweeper",
580
+      "unlocked_by": "scrabble-score",
580 581
       "difficulty": 6,
581 582
       "topics": [
582 583
 
@@ -586,7 +587,7 @@
586 587
       "uuid": "fb10dc2f-0ba1-44b6-8365-5e48e86d1283",
587 588
       "slug": "anagram",
588 589
       "core": false,
589
-      "unlocked_by": "isogram",
590
+      "unlocked_by": "hello-world",
590 591
       "difficulty": 7,
591 592
       "topics": [
592 593
 
@@ -606,7 +607,7 @@
606 607
       "uuid": "b53bde52-cb5f-4d43-86ec-18aa509d62f9",
607 608
       "slug": "word-search",
608 609
       "core": false,
609
-      "unlocked_by": "bowling",
610
+      "unlocked_by": "scrabble-score",
610 611
       "difficulty": 7,
611 612
       "topics": [
612 613
 
@@ -616,7 +617,7 @@
616 617
       "uuid": "e3e5ffe5-cfc1-467e-a28a-da0302130144",
617 618
       "slug": "simple-linked-list",
618 619
       "core": false,
619
-      "unlocked_by": "sublist",
620
+      "unlocked_by": "linked-list",
620 621
       "difficulty": 7,
621 622
       "topics": [
622 623
 
@@ -646,7 +647,7 @@
646 647
       "uuid": "162bebdc-9bf2-43c0-8460-a91f5fc16147",
647 648
       "slug": "crypto-square",
648 649
       "core": false,
649
-      "unlocked_by": "atbash-cipher",
650
+      "unlocked_by": "rotational-cipher",
650 651
       "difficulty": 7,
651 652
       "topics": [
652 653
 
@@ -656,7 +657,7 @@
656 657
       "uuid": "57eeac00-741c-4843-907a-51f0ac5ea4cb",
657 658
       "slug": "poker",
658 659
       "core": false,
659
-      "unlocked_by": "word-search",
660
+      "unlocked_by": "scrabble-score",
660 661
       "difficulty": 7,
661 662
       "topics": [
662 663
         "Parsing",
@@ -668,7 +669,7 @@
668 669
       "uuid": "97c8fcd4-85b6-41cb-9de2-b4e1b4951222",
669 670
       "slug": "clock",
670 671
       "core": false,
671
-      "unlocked_by": "all-your-base",
672
+      "unlocked_by": "saddle-points",
672 673
       "difficulty": 7,
673 674
       "topics": [
674 675
 
@@ -678,7 +679,7 @@
678 679
       "uuid": "5cbc6a67-3a53-4aad-ae68-ff469525437f",
679 680
       "slug": "ocr-numbers",
680 681
       "core": false,
681
-      "unlocked_by": "roman-numerals",
682
+      "unlocked_by": "robot-name",
682 683
       "difficulty": 8,
683 684
       "topics": [
684 685
 
@@ -688,7 +689,7 @@
688 689
       "uuid": "626dc25a-062c-4053-a8c1-788e4dc44ca0",
689 690
       "slug": "circular-buffer",
690 691
       "core": false,
691
-      "unlocked_by": "simple-linked-list",
692
+      "unlocked_by": "linked-list",
692 693
       "difficulty": 8,
693 694
       "topics": [
694 695
         "Queues",
@@ -700,7 +701,7 @@
700 701
       "uuid": "64cda115-919a-4eef-9a45-9ec5d1af98cc",
701 702
       "slug": "rectangles",
702 703
       "core": false,
703
-      "unlocked_by": "ocr-numbers",
704
+      "unlocked_by": "robot-name",
704 705
       "difficulty": 8,
705 706
       "topics": [
706 707
 
@@ -710,7 +711,7 @@
710 711
       "uuid": "e5f05d00-fe5b-4d78-b2fa-934c1c9afb32",
711 712
       "slug": "book-store",
712 713
       "core": false,
713
-      "unlocked_by": "bracket-push",
714
+      "unlocked_by": "flatten-array",
714 715
       "difficulty": 8,
715 716
       "topics": [
716 717
 
@@ -720,7 +721,7 @@
720 721
       "uuid": "f654831f-c34b-44f5-9dd5-054efbb486f2",
721 722
       "slug": "simple-cipher",
722 723
       "core": false,
723
-      "unlocked_by": "crypto-square",
724
+      "unlocked_by": "rotational-cipher",
724 725
       "difficulty": 8,
725 726
       "topics": [
726 727
 
@@ -730,7 +731,7 @@
730 731
       "uuid": "52d11278-0d65-4b5b-b387-1374fced3243",
731 732
       "slug": "complex-numbers",
732 733
       "core": false,
733
-      "unlocked_by": "prime-factors",
734
+      "unlocked_by": "triangle",
734 735
       "difficulty": 8,
735 736
       "topics": [
736 737
 
@@ -740,7 +741,7 @@
740 741
       "uuid": "a9836565-5c39-4285-b83a-53408be36ccc",
741 742
       "slug": "list-ops",
742 743
       "core": false,
743
-      "unlocked_by": "circular-buffer",
744
+      "unlocked_by": "linked-list",
744 745
       "difficulty": 8,
745 746
       "topics": [
746 747
 
@@ -750,7 +751,7 @@
750 751
       "uuid": "bac1f4bc-eea9-43c1-8e95-097347f5925e",
751 752
       "slug": "change",
752 753
       "core": false,
753
-      "unlocked_by": "book-store",
754
+      "unlocked_by": "flatten-array",
754 755
       "difficulty": 8,
755 756
       "topics": [
756 757
 
@@ -760,7 +761,7 @@
760 761
       "uuid": "873c05de-b5f5-4c5b-97f0-d1ede8a82832",
761 762
       "slug": "palindrome-products",
762 763
       "core": false,
763
-      "unlocked_by": "clock",
764
+      "unlocked_by": "saddle-points",
764 765
       "difficulty": 8,
765 766
       "topics": [
766 767
 
@@ -770,7 +771,7 @@
770 771
       "uuid": "88505f95-89e5-4a08-8ed2-208eb818cdf1",
771 772
       "slug": "pythagorean-triplet",
772 773
       "core": false,
773
-      "unlocked_by": "complex-numbers",
774
+      "unlocked_by": "triangle",
774 775
       "difficulty": 9,
775 776
       "topics": [
776 777
 
@@ -780,7 +781,7 @@
780 781
       "uuid": "f0c0316d-3fb5-455e-952a-91161e7fb298",
781 782
       "slug": "forth",
782 783
       "core": false,
783
-      "unlocked_by": "wordy",
784
+      "unlocked_by": "secret-handshake",
784 785
       "difficulty": 9,
785 786
       "topics": [
786 787
 
@@ -790,7 +791,7 @@
790 791
       "uuid": "377fe38b-08ad-4f3a-8118-a43c10f7b9b2",
791 792
       "slug": "custom-set",
792 793
       "core": false,
793
-      "unlocked_by": "list-ops",
794
+      "unlocked_by": "linked-list",
794 795
       "difficulty": 10,
795 796
       "topics": [
796 797
 

+ 76
- 68
docs/INSTALLATION.md Просмотреть файл

@@ -24,23 +24,24 @@ Open an administrative command prompt.  (If you need assistance opening an admin
24 24
 
25 25
 1. If you have not installed Chocolatey, do so now:
26 26
 
27
-   ```batchfile
28
-   C:\Windows\system32> @powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
29
-   ```
27
+     ```batchfile
28
+     C:\Windows\system32> @powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
29
+     ```
30
+
30 31
 2.  Install the JDK:
31 32
 
32
-   ```batchfile
33
-   C:\Windows\system32> choco install jdk8
34
-   ...
35
-   C:\Windows\system32> refreshenv
36
-   ...
37
-   ```
33
+     ```batchfile
34
+     C:\Windows\system32> choco install jdk8
35
+     ...
36
+     C:\Windows\system32> refreshenv
37
+     ...
38
+     ```
38 39
 3.  Install Gradle:
39 40
 
40
-   ```batchfile
41
-   C:\Windows\system32>choco install gradle
42
-   ...
43
-   ```
41
+     ```batchfile
42
+     C:\Windows\system32>choco install gradle
43
+     ...
44
+     ```
44 45
 
45 46
 We recommend closing the administrative command prompt and opening a new command prompt -- you do not require administrator privileges to practice Exercism exercises.
46 47
 
@@ -58,24 +59,27 @@ Below are instructions for install using the most common method - using Homebrew
58 59
 
59 60
 1. If you haven't installed [Homebrew](http://brew.sh), yet, do so now:
60 61
 
61
-   ```sh
62
-   $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
63
-   ```
62
+     ```sh
63
+     $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
64
+     ```
65
+
64 66
 2. Tap the [Homebrew Cask](https://caskroom.github.io/) — this allows us to install pre-built binaries like the JDK.
65 67
 
66
-   ```
67
-   $ brew tap caskroom/cask
68
-   ```
68
+     ```
69
+     $ brew tap caskroom/cask
70
+     ```
71
+
69 72
 3.  Install the JDK:
70 73
 
71
-   ```
72
-   $ brew cask install java
73
-   ```
74
+     ```
75
+     $ brew cask install java
76
+     ```
77
+
74 78
 4.  Install Gradle:
75 79
 
76
-   ```
77
-   $ brew install gradle
78
-   ```
80
+     ```
81
+     $ brew install gradle
82
+     ```
79 83
 
80 84
 You now are ready to get started with the Java track of Exercism!
81 85
 
@@ -98,21 +102,22 @@ If you are using Debian or its derivatives (like Ubuntu or Linux Mint), use APT:
98 102
 
99 103
 1. Install the JDK:
100 104
 
101
-   ```sh
102
-   $ sudo apt-get update
103
-   $ sudo apt-get install python-software-properties
104
-   $ sudo add-apt-repository ppa:webupd8team/java
105
-   $ sudo apt-get update
106
-   $ sudo apt-get install oracle-java8-installer
107
-   $ sudo apt install oracle-java8-set-default
108
-   ```
105
+     ```sh
106
+     $ sudo apt-get update
107
+     $ sudo apt-get install python-software-properties
108
+     $ sudo add-apt-repository ppa:webupd8team/java
109
+     $ sudo apt-get update
110
+     $ sudo apt-get install oracle-java8-installer
111
+     $ sudo apt install oracle-java8-set-default
112
+     ```
113
+
109 114
 2. Install Gradle:
110 115
 
111
-   ```sh
112
-   $ sudo add-apt-repository ppa:cwchien/gradle
113
-   $ sudo apt-get update
114
-   $ sudo apt-get install gradle
115
-   ```
116
+     ```sh
117
+     $ sudo add-apt-repository ppa:cwchien/gradle
118
+     $ sudo apt-get update
119
+     $ sudo apt-get install gradle
120
+     ```
116 121
 
117 122
 You now are ready to get started with the Java track of Exercism!
118 123
 
@@ -128,14 +133,15 @@ If you are using Fedora or its derivatives, use DNF:
128 133
 
129 134
 1. Install the JDK:
130 135
 
131
-   ```sh
132
-   $ sudo dnf install java-1.8.0-openjdk-devel
133
-   ```
136
+     ```sh
137
+     $ sudo dnf install java-1.8.0-openjdk-devel
138
+     ```
139
+
134 140
 2. Install Gradle:
135 141
 
136
-   ```sh
137
-   $ sudo dnf install gradle
138
-   ```
142
+     ```sh
143
+     $ sudo dnf install gradle
144
+     ```
139 145
 
140 146
 
141 147
 You now are ready to get started with the Java track of Exercism!
@@ -183,20 +189,21 @@ To get started, see "[Running the Tests](http://exercism.io/languages/java/tests
183 189
    1. Download "**Binary only distribution**" from the [Gradle download page](https://gradle.org/gradle-download/).
184 190
    2. Unpack Gradle:
185 191
 
186
-      ```sh
187
-      $ mkdir ~/tools
188
-      $ cd ~/tools
189
-      $ unzip ~/Downloads/gradle-*-bin.zip
190
-      $ cd gradle*
191
-      ```
192
+     ```sh
193
+     $ mkdir ~/tools
194
+     $ cd ~/tools
195
+     $ unzip ~/Downloads/gradle-*-bin.zip
196
+     $ cd gradle*
197
+     ```
198
+
192 199
    3. Configure Gradle and add it to the path:
193 200
 
194
-      ```sh
195
-      $ cat << DONE >> ~/.bashrc
196
-      export GRADLE_HOME=`pwd`
197
-      export PATH=\$PATH:\$GRADLE_HOME/bin
198
-     DONE
199
-     ```
201
+     ```sh
202
+     $ cat << DONE >> ~/.bashrc
203
+     export GRADLE_HOME=`pwd`
204
+     export PATH=\$PATH:\$GRADLE_HOME/bin
205
+    DONE
206
+    ```
200 207
 
201 208
 
202 209
 You now are ready to get started with the Java track of Exercism!
@@ -216,20 +223,21 @@ To get started, see "[Running the Tests](http://exercism.io/languages/java/tests
216 223
    1. Download "**Binary only distribution**" from the [Gradle download page](https://gradle.org/gradle-download/).
217 224
    2. Unpack Gradle:
218 225
 
219
-      ```sh
220
-      $ mkdir ~/tools
221
-      $ cd ~/tools
222
-      $ unzip ~/Downloads/gradle-*-bin.zip
223
-      $ cd gradle*
224
-      ```
226
+     ```sh
227
+     $ mkdir ~/tools
228
+     $ cd ~/tools
229
+     $ unzip ~/Downloads/gradle-*-bin.zip
230
+     $ cd gradle*
231
+     ```
232
+
225 233
    3. Configure Gradle and add it to the path:
226 234
 
227
-      ```sh
228
-      $ cat << DONE >> ~/.bashrc
229
-      export GRADLE_HOME=`pwd`
230
-      export PATH=\$PATH:\$GRADLE_HOME/bin
231
-     DONE
232
-     ```
235
+     ```sh
236
+     $ cat << DONE >> ~/.bashrc
237
+     export GRADLE_HOME=`pwd`
238
+     export PATH=\$PATH:\$GRADLE_HOME/bin
239
+    DONE
240
+    ```
233 241
 
234 242
 You now are ready to get started with the Java track of Exercism!
235 243
 

+ 47
- 41
docs/TESTS.md Просмотреть файл

@@ -13,30 +13,31 @@ Choose your operating system:
13 13
 1. Open a Command Prompt.
14 14
 2. Get the first exercise:
15 15
 
16
-   ```batchfile
17
-   C:\Users\JohnDoe>exercism fetch java
18
-   
19
-   Not Submitted:     1 problem
20
-   java (Hello World) C:\Users\JohnDoe\exercism\java\hello-world
21
-   
22
-   New:               1 problem
23
-   java (Hello World) C:\Users\JohnDoe\exercism\java\hello-world
24
-   
25
-   unchanged: 0, updated: 0, new: 1
26
-   
16
+     ```batchfile
17
+     C:\Users\JohnDoe>exercism fetch java
18
+
19
+     Not Submitted:     1 problem
20
+     java (Hello World) C:\Users\JohnDoe\exercism\java\hello-world
21
+
22
+     New:               1 problem
23
+     java (Hello World) C:\Users\JohnDoe\exercism\java\hello-world
24
+
25
+     unchanged: 0, updated: 0, new: 1
27 26
    ```
27
+
28 28
 3. Change directory into the exercism:
29 29
 
30
-   ```batchfile
31
-   C:\Users\JohnDoe>cd C:\Users\JohnDoe\exercism\java\hello-world
32
-   ```
30
+     ```batchfile
31
+     C:\Users\JohnDoe>cd C:\Users\JohnDoe\exercism\java\hello-world
32
+     ```
33 33
    
34 34
 4. Run the tests:
35 35
 
36
-   ```batchfile
37
-   C:\Users\JohnDoe>gradle test
38
-   ```
36
+     ```batchfile
37
+     C:\Users\JohnDoe>gradle test
38
+     ```
39 39
    *(Don't worry about the tests failing, at first, this is how you begin each exercise.)*
40
+
40 41
 5. Solve the exercise.  Find and work through the `TUTORIAL.md` guide ([view on GitHub](https://github.com/exercism/java/blob/master/exercises/hello-world/TUTORIAL.md)).
41 42
 
42 43
 
@@ -50,26 +51,28 @@ If you get stuck, at any point, don't forget to reach out for [help](http://exer
50 51
 
51 52
 1. In the terminal window, get the first exercise:
52 53
 
53
-   ```
54
-   $ exercism fetch java
54
+     ```
55
+     $ exercism fetch java
55 56
 
56
-   New:                 1 problem
57
-   Java (Etl) /Users/johndoe/exercism/java/hello-world
57
+     New:                 1 problem
58
+     Java (Etl) /Users/johndoe/exercism/java/hello-world
58 59
 
59
-   unchanged: 0, updated: 0, new: 1
60
+     unchanged: 0, updated: 0, new: 1
61
+    ```
60 62
 
61
-  ```
62 63
 2. Change directory into the exercise:
63 64
 
64
-   ```
65
-   $ cd /Users/johndoe/exercism/java/hello-world
66
-   ```
65
+     ```
66
+     $ cd /Users/johndoe/exercism/java/hello-world
67
+     ```
68
+
67 69
 3. Run the tests:
68 70
 
69
-  ```
70
-  $ gradle test
71
-  ```
71
+    ```
72
+    $ gradle test
73
+    ```
72 74
    *(Don't worry about the tests failing, at first, this is how you begin each exercise.)*
75
+
73 76
 4. Solve the exercise.  Find and work through the `TUTORIAL.md` guide ([view on GitHub](https://github.com/exercism/java/blob/master/exercises/hello-world/TUTORIAL.md)).
74 77
 
75 78
 Good luck!  Have fun!
@@ -82,26 +85,29 @@ If you get stuck, at any point, don't forget to reach out for [help](http://exer
82 85
 
83 86
 1. In the terminal window, get the first exercise:
84 87
 
85
-   ```
86
-   $ exercism fetch java
88
+     ```
89
+     $ exercism fetch java
87 90
 
88
-   New:                 1 problem
89
-   Java (Etl) /home/johndoe/exercism/java/hello-world
91
+     New:                 1 problem
92
+     Java (Etl) /home/johndoe/exercism/java/hello-world
90 93
 
91
-   unchanged: 0, updated: 0, new: 1
94
+     unchanged: 0, updated: 0, new: 1
95
+
96
+    ```
92 97
 
93
-  ```
94 98
 2. Change directory into the exercise:
95 99
 
96
-   ```
97
-   $ cd /home/johndoe/exercism/java/hello-world
98
-   ```
100
+     ```
101
+     $ cd /home/johndoe/exercism/java/hello-world
102
+     ```
103
+
99 104
 3. Run the tests:
100 105
 
101
-  ```
102
-  $ gradle test
103
-  ```
106
+    ```
107
+    $ gradle test
108
+    ```
104 109
    *(Don't worry about the tests failing, at first, this is how you begin each exercise.)*
110
+
105 111
 4. Solve the exercise.  Find and work through the `TUTORIAL.md` guide ([view on GitHub](https://github.com/exercism/java/blob/master/exercises/hello-world/TUTORIAL.md)).
106 112
 
107 113
 Good luck!  Have fun!

+ 7
- 1
exercises/bob/src/test/java/BobTest.java Просмотреть файл

@@ -1,12 +1,18 @@
1 1
 import org.junit.Test;
2 2
 import org.junit.Ignore;
3
+import org.junit.Before;
3 4
 
4 5
 import static org.junit.Assert.*;
5 6
 
6 7
 public class BobTest {
7
-    private final Bob bob = new Bob();
8
+    private Bob bob;
8 9
 
9 10
 
11
+    @Before
12
+    public void setUp() {
13
+        bob = new Bob();
14
+    }
15
+
10 16
     @Test
11 17
     public void saySomething() {
12 18
         assertEquals(