diff --git a/exercises/rna-transcription/src/example/java/RnaTranscription.java b/exercises/rna-transcription/src/example/java/RnaTranscription.java index a69f276b8..150aa9e9d 100644 --- a/exercises/rna-transcription/src/example/java/RnaTranscription.java +++ b/exercises/rna-transcription/src/example/java/RnaTranscription.java @@ -1,6 +1,6 @@ public class RnaTranscription { - public static String ofDna(String strand) { + public String ofDna(String strand) { StringBuilder sb = new StringBuilder(); for (char c : strand.toCharArray()) { switch (c) { diff --git a/exercises/rna-transcription/src/main/java/.keep b/exercises/rna-transcription/src/main/java/.keep deleted file mode 100644 index e69de29bb..000000000 diff --git a/exercises/rna-transcription/src/main/java/RnaTranscription.java b/exercises/rna-transcription/src/main/java/RnaTranscription.java new file mode 100644 index 000000000..a447ae0e2 --- /dev/null +++ b/exercises/rna-transcription/src/main/java/RnaTranscription.java @@ -0,0 +1,5 @@ +public class RnaTranscription { + public String ofDna(String dnaString) { + throw new UnsupportedOperationException("Method has not been implemented yet."); + } +} \ No newline at end of file diff --git a/exercises/rna-transcription/src/test/java/RnaTranscriptionTest.java b/exercises/rna-transcription/src/test/java/RnaTranscriptionTest.java index 1eb380a1a..6d32742c6 100644 --- a/exercises/rna-transcription/src/test/java/RnaTranscriptionTest.java +++ b/exercises/rna-transcription/src/test/java/RnaTranscriptionTest.java @@ -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")); } }