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

Merge pull request #183 from di72nn/minor_fixes

Correct minor formatting issues
John Ryan 9 лет назад
Родитель
Сommit
eea1d43a85

+ 3
- 3
exercises/etl/src/main/java/Etl.java Просмотреть файл

2
 import java.util.Map;
2
 import java.util.Map;
3
 
3
 
4
 public class Etl {
4
 public class Etl {
5
-   public Map<String, Integer> transform(Map<Integer, List<String>> old) {
6
-      return null;
7
-   }
5
+    public Map<String, Integer> transform(Map<Integer, List<String>> old) {
6
+        return null;
7
+    }
8
 }
8
 }

+ 1
- 1
exercises/hello-world/GETTING_STARTED.md Просмотреть файл

20
 
20
 
21
 ## Iterate through the tests
21
 ## Iterate through the tests
22
 
22
 
23
-After your first test passes, remove the `@Ignore` from the next test, and ierate on your solution,
23
+After your first test passes, remove the `@Ignore` from the next test, and iterate on your solution,
24
 testing after each change.
24
 testing after each change.
25
 
25
 
26
 ## All the tests pass?  Submit your solution!
26
 ## All the tests pass?  Submit your solution!

+ 3
- 3
exercises/hello-world/src/main/java/HelloWorld.java Просмотреть файл

1
 public class HelloWorld {
1
 public class HelloWorld {
2
-	public static String hello(String name) {
3
-      return null;
4
-	}
2
+    public static String hello(String name) {
3
+        return null;
4
+    }
5
 }
5
 }

+ 67
- 67
exercises/nucleotide-count/src/test/java/NucleotideTest.java Просмотреть файл

7
 public class NucleotideTest {
7
 public class NucleotideTest {
8
 
8
 
9
     @Test
9
     @Test
10
-  public void testEmptyDnaStringHasNoAdenosine() {
11
-    DNA dna = new DNA("");
12
-    assertThat(dna.count('A')).isEqualTo(0);
13
-  }
10
+    public void testEmptyDnaStringHasNoAdenosine() {
11
+        DNA dna = new DNA("");
12
+        assertThat(dna.count('A')).isEqualTo(0);
13
+    }
14
 
14
 
15
-  @Ignore
15
+    @Ignore
16
     @Test
16
     @Test
17
-  public void testEmptyDnaStringHasNoNucleotides() {
18
-    DNA dna = new DNA("");
19
-    assertThat(dna.nucleotideCounts()).hasSize(4).contains(
20
-        entry('A', 0),
21
-        entry('C', 0),
22
-        entry('G', 0),
23
-        entry('T', 0)
24
-    );
25
-  }
17
+    public void testEmptyDnaStringHasNoNucleotides() {
18
+        DNA dna = new DNA("");
19
+        assertThat(dna.nucleotideCounts()).hasSize(4).contains(
20
+            entry('A', 0),
21
+            entry('C', 0),
22
+            entry('G', 0),
23
+            entry('T', 0)
24
+        );
25
+    }
26
 
26
 
27
-  @Ignore
27
+    @Ignore
28
     @Test
28
     @Test
29
-  public void testRepetitiveCytidineGetsCounted() {
30
-    DNA dna = new DNA("CCCCC");
31
-    assertThat(dna.count('C')).isEqualTo(5);
32
-  }
29
+    public void testRepetitiveCytidineGetsCounted() {
30
+        DNA dna = new DNA("CCCCC");
31
+        assertThat(dna.count('C')).isEqualTo(5);
32
+    }
33
 
33
 
34
-  @Ignore
34
+    @Ignore
35
     @Test
35
     @Test
36
-  public void testRepetitiveSequenceWithOnlyGuanosine() {
37
-    DNA dna = new DNA("GGGGGGGG");
38
-    assertThat(dna.nucleotideCounts()).hasSize(4).contains(
39
-        entry('A', 0),
40
-        entry('C', 0),
41
-        entry('G', 8),
42
-        entry('T', 0)
43
-    );
44
-  }
36
+    public void testRepetitiveSequenceWithOnlyGuanosine() {
37
+        DNA dna = new DNA("GGGGGGGG");
38
+        assertThat(dna.nucleotideCounts()).hasSize(4).contains(
39
+            entry('A', 0),
40
+            entry('C', 0),
41
+            entry('G', 8),
42
+            entry('T', 0)
43
+        );
44
+    }
45
 
45
 
46
-  @Ignore
46
+    @Ignore
47
     @Test
47
     @Test
48
-  public void testCountsOnlyThymidine() {
49
-    DNA dna = new DNA("GGGGGTAACCCGG");
50
-    assertThat(dna.count('T')).isEqualTo(1);
51
-  }
48
+    public void testCountsOnlyThymidine() {
49
+        DNA dna = new DNA("GGGGGTAACCCGG");
50
+        assertThat(dna.count('T')).isEqualTo(1);
51
+    }
52
 
52
 
53
-  @Ignore
53
+    @Ignore
54
     @Test
54
     @Test
55
-  public void testCountsANucleotideOnlyOnce() {
56
-    DNA dna = new DNA("CGATTGGG");
57
-    dna.count('T');
58
-    assertThat(dna.count('T')).isEqualTo(2);
59
-  }
55
+    public void testCountsANucleotideOnlyOnce() {
56
+        DNA dna = new DNA("CGATTGGG");
57
+        dna.count('T');
58
+        assertThat(dna.count('T')).isEqualTo(2);
59
+    }
60
 
60
 
61
-  @Ignore
61
+    @Ignore
62
     @Test
62
     @Test
63
-  public void testDnaCountsDoNotChangeAfterCountingAdenosine() {
64
-    DNA dna = new DNA("GATTACA");
65
-    dna.count('A');
66
-    assertThat(dna.nucleotideCounts()).hasSize(4).contains(
67
-        entry('A', 3),
68
-        entry('C', 1),
69
-        entry('G', 1),
70
-        entry('T', 2)
71
-    );
72
-  }
63
+    public void testDnaCountsDoNotChangeAfterCountingAdenosine() {
64
+        DNA dna = new DNA("GATTACA");
65
+        dna.count('A');
66
+        assertThat(dna.nucleotideCounts()).hasSize(4).contains(
67
+            entry('A', 3),
68
+            entry('C', 1),
69
+            entry('G', 1),
70
+            entry('T', 2)
71
+        );
72
+    }
73
 
73
 
74
-  @Ignore
74
+    @Ignore
75
     @Test(expected = IllegalArgumentException.class)
75
     @Test(expected = IllegalArgumentException.class)
76
-  public void testValidatesNucleotides() {
77
-    DNA dna = new DNA("GACT");
78
-    dna.count('X');
79
-  }
76
+    public void testValidatesNucleotides() {
77
+        DNA dna = new DNA("GACT");
78
+        dna.count('X');
79
+    }
80
 
80
 
81
-  @Ignore
81
+    @Ignore
82
     @Test
82
     @Test
83
-  public void testCountsAllNucleotides() {
84
-    String s = "AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC";
85
-    DNA dna = new DNA(s);
86
-    assertThat(dna.nucleotideCounts()).hasSize(4).contains(
87
-        entry('A', 20),
88
-        entry('C', 12),
89
-        entry('G', 17),
90
-        entry('T', 21)
91
-    );
92
-  }
83
+    public void testCountsAllNucleotides() {
84
+        String s = "AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC";
85
+        DNA dna = new DNA(s);
86
+        assertThat(dna.nucleotideCounts()).hasSize(4).contains(
87
+            entry('A', 20),
88
+            entry('C', 12),
89
+            entry('G', 17),
90
+            entry('T', 21)
91
+        );
92
+    }
93
 }
93
 }