Sha256: ebce2733a9f19b9a9e7f30a54e0ddafc03b8a3fa3479982d9a6ab13c5cb0249e

Contents?: true

Size: 1.24 KB

Versions: 168

Compression:

Stored size: 1.24 KB

Contents

@Grab('org.spockframework:spock-core:1.0-groovy-2.4')
import spock.lang.*

class RnaTranscriptionSpec extends Specification {

    @Shared
    def complement = new RnaTranscription()

    def 'the rna complement of cytosine is guanine'() {
        expect: complement.ofDNA('C') == 'G'
    }

    @Ignore
    def 'the rna complement of guanine is cytosine'() {
        expect: complement.ofDNA('G') == 'C'
    }

    @Ignore
    def 'the rna complement of thymine is adenine'() {
        expect: complement.ofDNA('T') == 'A'
    }

    @Ignore
    def 'the rna complement of adenine is uracil'() {
        expect: complement.ofDNA('A') == 'U'
    }

    @Ignore
    def 'can calculate long strand complement'() {
        expect: complement.ofDNA('ACGTGGTCTTAA') == 'UGCACCAGAAUU'
    }

    @Ignore
    def 'correctly handles invalid input'() {
        when: complement.ofDNA('U')
        then: thrown(IllegalArgumentException)
    }

    @Ignore
    def 'correctly handles completely invalid input'() {
        when: complement.ofDNA('XXX')
        then: thrown(IllegalArgumentException)
    }

    @Ignore
    def 'correctly handles partially invalid input'() {
        when: complement.ofDNA('ACGTXXXCTTAA')
        then: thrown(IllegalArgumentException)
    }

}

Version data entries

168 entries across 168 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/groovy/exercises/rna-transcription/RnaTranscriptionSpec.groovy
trackler-2.2.1.179 tracks/groovy/exercises/rna-transcription/RnaTranscriptionSpec.groovy
trackler-2.2.1.178 tracks/groovy/exercises/rna-transcription/RnaTranscriptionSpec.groovy
trackler-2.2.1.177 tracks/groovy/exercises/rna-transcription/RnaTranscriptionSpec.groovy
trackler-2.2.1.176 tracks/groovy/exercises/rna-transcription/RnaTranscriptionSpec.groovy
trackler-2.2.1.175 tracks/groovy/exercises/rna-transcription/RnaTranscriptionSpec.groovy
trackler-2.2.1.174 tracks/groovy/exercises/rna-transcription/RnaTranscriptionSpec.groovy
trackler-2.2.1.173 tracks/groovy/exercises/rna-transcription/RnaTranscriptionSpec.groovy
trackler-2.2.1.172 tracks/groovy/exercises/rna-transcription/RnaTranscriptionSpec.groovy
trackler-2.2.1.171 tracks/groovy/exercises/rna-transcription/RnaTranscriptionSpec.groovy
trackler-2.2.1.170 tracks/groovy/exercises/rna-transcription/RnaTranscriptionSpec.groovy
trackler-2.2.1.169 tracks/groovy/exercises/rna-transcription/RnaTranscriptionSpec.groovy
trackler-2.2.1.167 tracks/groovy/exercises/rna-transcription/RnaTranscriptionSpec.groovy
trackler-2.2.1.166 tracks/groovy/exercises/rna-transcription/RnaTranscriptionSpec.groovy
trackler-2.2.1.165 tracks/groovy/exercises/rna-transcription/RnaTranscriptionSpec.groovy
trackler-2.2.1.164 tracks/groovy/exercises/rna-transcription/RnaTranscriptionSpec.groovy
trackler-2.2.1.163 tracks/groovy/exercises/rna-transcription/RnaTranscriptionSpec.groovy
trackler-2.2.1.162 tracks/groovy/exercises/rna-transcription/RnaTranscriptionSpec.groovy
trackler-2.2.1.161 tracks/groovy/exercises/rna-transcription/RnaTranscriptionSpec.groovy
trackler-2.2.1.160 tracks/groovy/exercises/rna-transcription/RnaTranscriptionSpec.groovy