Skip to content

Commit 5df2e8b

Browse files
authored
Merge pull request exercism#521 from Smarticles101/rna-transcription-rename
rna-transcription: rename "ofDna" with "transcribe"
2 parents 7db59e5 + 13406da commit 5df2e8b

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

‎exercises/rna-transcription/src/example/java/RnaTranscription.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
public class RnaTranscription {
22

3-
public String ofDna(String strand) {
3+
public String transcribe(String dnaStrand) {
44
StringBuilder sb = new StringBuilder();
5-
for (char c : strand.toCharArray()) {
5+
for (char c : dnaStrand.toCharArray()) {
66
switch (c) {
77
case 'A':
88
sb.append('U');
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
public class RnaTranscription {
2-
public String ofDna(String dnaString) {
2+
public String transcribe(String dnaStrand) {
33
throw new UnsupportedOperationException("Method has not been implemented yet.");
44
}
55
}

‎exercises/rna-transcription/src/test/java/RnaTranscriptionTest.java‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,36 +14,36 @@ public void setUp() {
1414

1515
@Test
1616
public void testRnaTranscriptionOfEmptyDnaIsEmptyRna() {
17-
Assert.assertEquals("", rnaTranscription.ofDna(""));
17+
Assert.assertEquals("", rnaTranscription.transcribe(""));
1818
}
1919

2020
@Ignore("Remove to run test")
2121
@Test
2222
public void testRnaTranscriptionOfCytosineIsGuanine() {
23-
Assert.assertEquals("G", rnaTranscription.ofDna("C"));
23+
Assert.assertEquals("G", rnaTranscription.transcribe("C"));
2424
}
2525

2626
@Ignore("Remove to run test")
2727
@Test
2828
public void testRnaTranscriptionOfGuanineIsCytosine() {
29-
Assert.assertEquals("C", rnaTranscription.ofDna("G"));
29+
Assert.assertEquals("C", rnaTranscription.transcribe("G"));
3030
}
3131

3232
@Ignore("Remove to run test")
3333
@Test
3434
public void testRnaTranscriptionOfThymineIsAdenine() {
35-
Assert.assertEquals("A", rnaTranscription.ofDna("T"));
35+
Assert.assertEquals("A", rnaTranscription.transcribe("T"));
3636
}
3737

3838
@Ignore("Remove to run test")
3939
@Test
4040
public void testRnaTranscriptionOfAdenineIsUracil() {
41-
Assert.assertEquals("U", rnaTranscription.ofDna("A"));
41+
Assert.assertEquals("U", rnaTranscription.transcribe("A"));
4242
}
4343

4444
@Ignore("Remove to run test")
4545
@Test
4646
public void testRnaTranscription() {
47-
Assert.assertEquals("UGCACCAGAAUU", rnaTranscription.ofDna("ACGTGGTCTTAA"));
47+
Assert.assertEquals("UGCACCAGAAUU", rnaTranscription.transcribe("ACGTGGTCTTAA"));
4848
}
4949
}

0 commit comments

Comments
 (0)