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.0.3.2 tracks/groovy/exercises/rna-transcription/ComplementSpec.groovy
trackler-2.0.3.1 tracks/groovy/exercises/rna-transcription/ComplementSpec.groovy
trackler-2.0.3.0 tracks/groovy/exercises/rna-transcription/ComplementSpec.groovy
trackler-2.0.2.0 tracks/groovy/exercises/rna-transcription/ComplementSpec.groovy
trackler-2.0.1.2 tracks/groovy/exercises/rna-transcription/ComplementSpec.groovy
trackler-2.0.1.1 tracks/groovy/exercises/rna-transcription/ComplementSpec.groovy