Sha256: 9483076e0a902aa660e8385aaefef9a275248f54aabc70b737003b76d5e0ba46

Contents?: true

Size: 1.93 KB

Versions: 80

Compression:

Stored size: 1.93 KB

Contents

import org.scalatest.{FunSuite, Matchers}

/** @version created manually **/
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.110 tracks/scala/exercises/protein-translation/src/test/scala/ProteinTranslationTest.scala
trackler-2.2.1.109 tracks/scala/exercises/protein-translation/src/test/scala/ProteinTranslationTest.scala
trackler-2.2.1.108 tracks/scala/exercises/protein-translation/src/test/scala/ProteinTranslationTest.scala
trackler-2.2.1.107 tracks/scala/exercises/protein-translation/src/test/scala/ProteinTranslationTest.scala
trackler-2.2.1.106 tracks/scala/exercises/protein-translation/src/test/scala/ProteinTranslationTest.scala
trackler-2.2.1.105 tracks/scala/exercises/protein-translation/src/test/scala/ProteinTranslationTest.scala
trackler-2.2.1.104 tracks/scala/exercises/protein-translation/src/test/scala/ProteinTranslationTest.scala
trackler-2.2.1.103 tracks/scala/exercises/protein-translation/src/test/scala/ProteinTranslationTest.scala
trackler-2.2.1.102 tracks/scala/exercises/protein-translation/src/test/scala/ProteinTranslationTest.scala
trackler-2.2.1.101 tracks/scala/exercises/protein-translation/src/test/scala/ProteinTranslationTest.scala
trackler-2.2.1.100 tracks/scala/exercises/protein-translation/src/test/scala/ProteinTranslationTest.scala
trackler-2.2.1.99 tracks/scala/exercises/protein-translation/src/test/scala/ProteinTranslationTest.scala
trackler-2.2.1.98 tracks/scala/exercises/protein-translation/src/test/scala/ProteinTranslationTest.scala
trackler-2.2.1.97 tracks/scala/exercises/protein-translation/src/test/scala/ProteinTranslationTest.scala
trackler-2.2.1.96 tracks/scala/exercises/protein-translation/src/test/scala/ProteinTranslationTest.scala
trackler-2.2.1.95 tracks/scala/exercises/protein-translation/src/test/scala/ProteinTranslationTest.scala
trackler-2.2.1.94 tracks/scala/exercises/protein-translation/src/test/scala/ProteinTranslationTest.scala
trackler-2.2.1.93 tracks/scala/exercises/protein-translation/src/test/scala/ProteinTranslationTest.scala
trackler-2.2.1.92 tracks/scala/exercises/protein-translation/src/test/scala/ProteinTranslationTest.scala
trackler-2.2.1.91 tracks/scala/exercises/protein-translation/src/test/scala/ProteinTranslationTest.scala