Sha256: 897e58074f88ddeae0d4e463f7a7bb6585ab3218a8b583a99992eb4c44af0b97

Contents?: true

Size: 1.22 KB

Versions: 206

Compression:

Stored size: 1.22 KB

Contents

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

class ComplementTest extends Specification {

    @Shared
    def complement = new Complement()

    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

206 entries across 206 versions & 1 rubygems

Version Path
trackler-2.1.0.32 tracks/groovy/exercises/rna-transcription/ComplementSpec.groovy
trackler-2.1.0.31 tracks/groovy/exercises/rna-transcription/ComplementSpec.groovy
trackler-2.1.0.30 tracks/groovy/exercises/rna-transcription/ComplementSpec.groovy
trackler-2.1.0.29 tracks/groovy/exercises/rna-transcription/ComplementSpec.groovy
trackler-2.1.0.28 tracks/groovy/exercises/rna-transcription/ComplementSpec.groovy
trackler-2.1.0.27 tracks/groovy/exercises/rna-transcription/ComplementSpec.groovy
trackler-2.1.0.26 tracks/groovy/exercises/rna-transcription/ComplementSpec.groovy
trackler-2.1.0.25 tracks/groovy/exercises/rna-transcription/ComplementSpec.groovy
trackler-2.1.0.24 tracks/groovy/exercises/rna-transcription/ComplementSpec.groovy
trackler-2.1.0.23 tracks/groovy/exercises/rna-transcription/ComplementSpec.groovy
trackler-2.1.0.22 tracks/groovy/exercises/rna-transcription/ComplementSpec.groovy
trackler-2.1.0.21 tracks/groovy/exercises/rna-transcription/ComplementSpec.groovy
trackler-2.1.0.20 tracks/groovy/exercises/rna-transcription/ComplementSpec.groovy
trackler-2.1.0.19 tracks/groovy/exercises/rna-transcription/ComplementSpec.groovy
trackler-2.1.0.18 tracks/groovy/exercises/rna-transcription/ComplementSpec.groovy
trackler-2.1.0.17 tracks/groovy/exercises/rna-transcription/ComplementSpec.groovy
trackler-2.1.0.16 tracks/groovy/exercises/rna-transcription/ComplementSpec.groovy
trackler-2.1.0.15 tracks/groovy/exercises/rna-transcription/ComplementSpec.groovy
trackler-2.1.0.14 tracks/groovy/exercises/rna-transcription/ComplementSpec.groovy
trackler-2.1.0.13 tracks/groovy/exercises/rna-transcription/ComplementSpec.groovy