-
-
Notifications
You must be signed in to change notification settings - Fork 682
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #334 from FridaTveit/RnaTranscriptionChangeToObject
rna-transcription: make object-based and add starter implementation
- Loading branch information
Showing
4 changed files
with
20 additions
and
8 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
exercises/rna-transcription/src/example/java/RnaTranscription.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
5 changes: 5 additions & 0 deletions
5
exercises/rna-transcription/src/main/java/RnaTranscription.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
public class RnaTranscription { | ||
public String ofDna(String dnaString) { | ||
throw new UnsupportedOperationException("Method has not been implemented yet."); | ||
} | ||
} |
21 changes: 14 additions & 7 deletions
21
exercises/rna-transcription/src/test/java/RnaTranscriptionTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,49 @@ | ||
import org.junit.Assert; | ||
import org.junit.Test; | ||
import org.junit.Before; | ||
import org.junit.Ignore; | ||
import org.junit.Test; | ||
|
||
public class RnaTranscriptionTest { | ||
|
||
private RnaTranscription rnaTranscription; | ||
|
||
@Before | ||
public void setUp() { | ||
rnaTranscription = new RnaTranscription(); | ||
} | ||
|
||
@Test | ||
public void testRnaTranscriptionOfEmptyDnaIsEmptyRna() { | ||
Assert.assertEquals("", RnaTranscription.ofDna("")); | ||
Assert.assertEquals("", rnaTranscription.ofDna("")); | ||
} | ||
|
||
@Ignore | ||
@Test | ||
public void testRnaTranscriptionOfCytosineIsGuanine() { | ||
Assert.assertEquals("G", RnaTranscription.ofDna("C")); | ||
Assert.assertEquals("G", rnaTranscription.ofDna("C")); | ||
} | ||
|
||
@Ignore | ||
@Test | ||
public void testRnaTranscriptionOfGuanineIsCytosine() { | ||
Assert.assertEquals("C", RnaTranscription.ofDna("G")); | ||
Assert.assertEquals("C", rnaTranscription.ofDna("G")); | ||
} | ||
|
||
@Ignore | ||
@Test | ||
public void testRnaTranscriptionOfThymineIsAdenine() { | ||
Assert.assertEquals("A", RnaTranscription.ofDna("T")); | ||
Assert.assertEquals("A", rnaTranscription.ofDna("T")); | ||
} | ||
|
||
@Ignore | ||
@Test | ||
public void testRnaTranscriptionOfAdenineIsUracil() { | ||
Assert.assertEquals("U", RnaTranscription.ofDna("A")); | ||
Assert.assertEquals("U", rnaTranscription.ofDna("A")); | ||
} | ||
|
||
@Ignore | ||
@Test | ||
public void testRnaTranscription() { | ||
Assert.assertEquals("UGCACCAGAAUU", RnaTranscription.ofDna("ACGTGGTCTTAA")); | ||
Assert.assertEquals("UGCACCAGAAUU", rnaTranscription.ofDna("ACGTGGTCTTAA")); | ||
} | ||
} |