Sha256: 4c485adf2abf8b6a536e4e79f9f59ee9cb0e7e62b02a91a0017185c1d922f29b
Contents?: true
Size: 980 Bytes
Versions: 68
Compression:
Stored size: 980 Bytes
Contents
import org.scalatest.{Matchers, FunSuite} /** @version 1.3.0 */ class NucleotideCountTest extends FunSuite with Matchers { test("empty strand") { new DNA("").nucleotideCounts should be( Right(Map('A' -> 0, 'C' -> 0, 'G' -> 0, 'T' -> 0))) } test("can count one nucleotide in single-character input") { pending new DNA("G").nucleotideCounts should be( Right(Map('A' -> 0, 'C' -> 0, 'G' -> 1, 'T' -> 0))) } test("strand with repeated nucleotide") { pending new DNA("GGGGGGG").nucleotideCounts should be( Right(Map('A' -> 0, 'C' -> 0, 'G' -> 7, 'T' -> 0))) } test("strand with multiple nucleotides") { pending new DNA( "AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC").nucleotideCounts should be( Right(Map('A' -> 20, 'C' -> 12, 'G' -> 17, 'T' -> 21))) } test("strand with invalid nucleotides") { pending new DNA("AGXXACT").nucleotideCounts.isLeft should be(true) } }
Version data entries
68 entries across 68 versions & 1 rubygems