Sha256: 1b2f775ace311bbdb221a75b71c4188ec3e859c03ddcaea3d93d531dcbd620bd

Contents?: true

Size: 988 Bytes

Versions: 16

Compression:

Stored size: 988 Bytes

Contents

import org.junit.Assert;
import org.junit.Test;

class RnaTranscriptionTest {

    /*
      In Kotlin functions can be declared at top level in a file, meaning
      you do not need to create a class to hold a function, like languages
      such as Java, C# or Scala.

      http://kotlinlang.org/docs/reference/functions.html#function-scope

     */

    @Test
    fun emptyDnaIsEmptyRna() {
        Assert.assertEquals("", transcribeToRna(""));
    }

    @Test
    fun cytosineIsGuanine() {
        Assert.assertEquals("G", transcribeToRna("C"));
    }

    @Test
    fun guanineIsCytosine() {
        Assert.assertEquals("C", transcribeToRna("G"));
    }

    @Test
    fun thymineIsAdenine() {
        Assert.assertEquals("A", transcribeToRna("T"));
    }

    @Test
    fun adenineIsUracil() {
        Assert.assertEquals("U", transcribeToRna("A"));
    }

    @Test
    fun rnaTranscription() {
        Assert.assertEquals("UGCACCAGAAUU", transcribeToRna("ACGTGGTCTTAA"));
    }
}

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
trackler-2.0.6.33 tracks/kotlin/exercises/rna-transcription/src/test/kotlin/RnaTranscriptionTest.kt
trackler-2.0.6.32 tracks/kotlin/exercises/rna-transcription/src/test/kotlin/RnaTranscriptionTest.kt
trackler-2.0.6.31 tracks/kotlin/exercises/rna-transcription/src/test/kotlin/RnaTranscriptionTest.kt
trackler-2.0.6.30 tracks/kotlin/exercises/rna-transcription/src/test/kotlin/RnaTranscriptionTest.kt
trackler-2.0.6.29 tracks/kotlin/exercises/rna-transcription/src/test/kotlin/RnaTranscriptionTest.kt
trackler-2.0.6.28 tracks/kotlin/exercises/rna-transcription/src/test/kotlin/RnaTranscriptionTest.kt
trackler-2.0.6.27 tracks/kotlin/exercises/rna-transcription/src/test/kotlin/RnaTranscriptionTest.kt
trackler-2.0.6.26 tracks/kotlin/exercises/rna-transcription/src/test/kotlin/RnaTranscriptionTest.kt
trackler-2.0.6.25 tracks/kotlin/exercises/rna-transcription/src/test/kotlin/RnaTranscriptionTest.kt
trackler-2.0.6.24 tracks/kotlin/exercises/rna-transcription/src/test/kotlin/RnaTranscriptionTest.kt
trackler-2.0.6.23 tracks/kotlin/exercises/rna-transcription/src/test/kotlin/RnaTranscriptionTest.kt
trackler-2.0.6.22 tracks/kotlin/exercises/rna-transcription/src/test/kotlin/RnaTranscriptionTest.kt
trackler-2.0.6.21 tracks/kotlin/exercises/rna-transcription/src/test/kotlin/RnaTranscriptionTest.kt
trackler-2.0.6.20 tracks/kotlin/exercises/rna-transcription/src/test/kotlin/RnaTranscriptionTest.kt
trackler-2.0.6.19 tracks/kotlin/exercises/rna-transcription/src/test/kotlin/RnaTranscriptionTest.kt
trackler-2.0.6.18 tracks/kotlin/exercises/rna-transcription/src/test/kotlin/RnaTranscriptionTest.kt