Sha256: e5f5cbb4826a1deea63b3499c12956cc2c606c6a28e1a2528acee12d57b0bee8

Contents?: true

Size: 1.9 KB

Versions: 80

Compression:

Stored size: 1.9 KB

Contents

import org.scalatest.{FunSuite, Matchers}

class ProteinTranslationTest extends FunSuite with Matchers {
  test("Identifies methionine codon") {
    ProteinTranslation.translate("AUG") should be(Seq("Methionine"))
  }

  test("Identifies phenylalanine codons") {
    pending
    ProteinTranslation.translate("UUU") should be(Seq("Phenylalanine"))
    ProteinTranslation.translate("UUC") should be(Seq("Phenylalanine"))
  }

  test("Identifies leucine codons") {
    pending
    ProteinTranslation.translate("UUA") should be(Seq("Leucine"))
    ProteinTranslation.translate("UUG") should be(Seq("Leucine"))
  }

  test("Identifies serine codons") {
    pending
    ProteinTranslation.translate("UCU") should be(Seq("Serine"))
    ProteinTranslation.translate("UCC") should be(Seq("Serine"))
    ProteinTranslation.translate("UCA") should be(Seq("Serine"))
    ProteinTranslation.translate("UCG") should be(Seq("Serine"))
  }

  test("Identifies tyrosine codons") {
    pending
    ProteinTranslation.translate("UAU") should be(Seq("Tyrosine"))
    ProteinTranslation.translate("UAC") should be(Seq("Tyrosine"))
  }

  test("Identifies cysteine codons") {
    pending
    ProteinTranslation.translate("UGU") should be(Seq("Cysteine"))
    ProteinTranslation.translate("UGC") should be(Seq("Cysteine"))
  }

  test("Identifies tryptophan codons") {
    pending
    ProteinTranslation.translate("UGG") should be(Seq("Tryptophan"))
  }

  test("Translate RNA strand into correct protein") {
    pending
    ProteinTranslation.translate("AUGUUUUGG") should be(Seq("Methionine", "Phenylalanine", "Tryptophan"))
  }

  test("Stops translation if stop codon is present") {
    pending
    ProteinTranslation.translate("AUGUUUUAA") should be(Seq("Methionine", "Phenylalanine"))
  }

  test("Stops translation of longest strand") {
    pending
    ProteinTranslation.translate("UGGUGUUAUUAAUGGUUU") should be(Seq("Tryptophan", "Cysteine", "Tyrosine"))
  }
}

Version data entries

80 entries across 80 versions & 1 rubygems

Version Path
trackler-2.2.1.30 tracks/scala/exercises/protein-translation/src/test/scala/ProteinTranslationTest.scala
trackler-2.2.1.29 tracks/scala/exercises/protein-translation/src/test/scala/ProteinTranslationTest.scala
trackler-2.2.1.28 tracks/scala/exercises/protein-translation/src/test/scala/ProteinTranslationTest.scala
trackler-2.2.1.27 tracks/scala/exercises/protein-translation/src/test/scala/ProteinTranslationTest.scala
trackler-2.2.1.26 tracks/scala/exercises/protein-translation/src/test/scala/ProteinTranslationTest.scala
trackler-2.2.1.25 tracks/scala/exercises/protein-translation/src/test/scala/ProteinTranslationTest.scala
trackler-2.2.1.24 tracks/scala/exercises/protein-translation/src/test/scala/ProteinTranslationTest.scala
trackler-2.2.1.23 tracks/scala/exercises/protein-translation/src/test/scala/ProteinTranslationTest.scala
trackler-2.2.1.22 tracks/scala/exercises/protein-translation/src/test/scala/ProteinTranslationTest.scala
trackler-2.2.1.21 tracks/scala/exercises/protein-translation/src/test/scala/ProteinTranslationTest.scala
trackler-2.2.1.20 tracks/scala/exercises/protein-translation/src/test/scala/ProteinTranslationTest.scala
trackler-2.2.1.19 tracks/scala/exercises/protein-translation/src/test/scala/ProteinTranslationTest.scala
trackler-2.2.1.18 tracks/scala/exercises/protein-translation/src/test/scala/ProteinTranslationTest.scala
trackler-2.2.1.17 tracks/scala/exercises/protein-translation/src/test/scala/ProteinTranslationTest.scala
trackler-2.2.1.16 tracks/scala/exercises/protein-translation/src/test/scala/ProteinTranslationTest.scala
trackler-2.2.1.15 tracks/scala/exercises/protein-translation/src/test/scala/ProteinTranslationTest.scala
trackler-2.2.1.14 tracks/scala/exercises/protein-translation/src/test/scala/ProteinTranslationTest.scala
trackler-2.2.1.13 tracks/scala/exercises/protein-translation/src/test/scala/ProteinTranslationTest.scala
trackler-2.2.1.12 tracks/scala/exercises/protein-translation/src/test/scala/ProteinTranslationTest.scala
trackler-2.2.1.11 tracks/scala/exercises/protein-translation/src/test/scala/ProteinTranslationTest.scala