Skip to content

Commit e827033

Browse files
authored
Converting RNA Transcription tests to AssertJ (exercism#1998)
1 parent c807679 commit e827033

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

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

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import org.junit.Ignore;
33
import org.junit.Test;
44

5-
import static org.junit.Assert.assertEquals;
5+
import static org.assertj.core.api.Assertions.assertThat;
66

77
public class RnaTranscriptionTest {
88

@@ -15,37 +15,36 @@ public void setUp() {
1515

1616
@Test
1717
public void testEmptyRnaSequence() {
18-
assertEquals("", rnaTranscription.transcribe(""));
18+
assertThat(rnaTranscription.transcribe("")).isEmpty();
1919
}
2020

2121
@Ignore("Remove to run test")
2222
@Test
2323
public void testRnaTranscriptionOfCytosineIsGuanine() {
24-
assertEquals("G", rnaTranscription.transcribe("C"));
24+
assertThat(rnaTranscription.transcribe("C")).isEqualTo("G");
2525
}
2626

2727
@Ignore("Remove to run test")
2828
@Test
2929
public void testRnaTranscriptionOfGuanineIsCytosine() {
30-
assertEquals("C", rnaTranscription.transcribe("G"));
30+
assertThat(rnaTranscription.transcribe("G")).isEqualTo("C");
3131
}
3232

3333
@Ignore("Remove to run test")
3434
@Test
3535
public void testRnaTranscriptionOfThymineIsAdenine() {
36-
assertEquals("A", rnaTranscription.transcribe("T"));
36+
assertThat(rnaTranscription.transcribe("T")).isEqualTo("A");
3737
}
3838

3939
@Ignore("Remove to run test")
4040
@Test
4141
public void testRnaTranscriptionOfAdenineIsUracil() {
42-
assertEquals("U", rnaTranscription.transcribe("A"));
42+
assertThat(rnaTranscription.transcribe("A")).isEqualTo("U");
4343
}
4444

4545
@Ignore("Remove to run test")
4646
@Test
4747
public void testRnaTranscription() {
48-
assertEquals("UGCACCAGAAUU", rnaTranscription.transcribe("ACGTGGTCTTAA"));
48+
assertThat(rnaTranscription.transcribe("ACGTGGTCTTAA")).isEqualTo("UGCACCAGAAUU");
4949
}
50-
5150
}

0 commit comments

Comments
 (0)