Sha256: 6f1d8636e21c83e2d01642d124ffdfd2e8a5ea96182caac20492e2f21f79ac75

Contents?: true

Size: 1.51 KB

Versions: 121

Compression:

Stored size: 1.51 KB

Contents

(ns protein-translation-test
  (:require [clojure.test :refer [deftest is are]]
            protein-translation))

(deftest AUG-translates-to-Methionine
  (is (= "Methionine" (protein-translation/translate-codon "AUG"))))

(deftest UGG-translates-to-Tryptophan
  (is (= "Tryptophan" (protein-translation/translate-codon "UGG"))))

(deftest identifies-Phenylalanine-codons
  (are [codon] (= "Phenylalanine" (protein-translation/translate-codon codon)) "UUU" "UUC"))

(deftest identifies-Leucine-codons
  (are [codon] (= "Leucine" (protein-translation/translate-codon codon)) "UUA" "UUG"))

(deftest identiefies-Serine-codons
  (are [codon] (= "Serine" (protein-translation/translate-codon codon)) "UCU" "UCC" "UCA" "UCG"))

(deftest identiefies-Tyrosine-codons
  (are [codon] (= "Tyrosine" (protein-translation/translate-codon codon)) "UAU" "UAC"))

(deftest identifies-Cysteine-codons
  (are [codon] (= "Cysteine" (protein-translation/translate-codon codon)) "UGU" "UGC"))

(deftest identifies-stop-codons
  (are [codon] (= "STOP" (protein-translation/translate-codon codon)) "UAA" "UAG" "UGA"))

(deftest translates-rna-strand-into-correct-protein
  (is (= ["Methionine" "Phenylalanine" "Tryptophan"] (protein-translation/translate-rna "AUGUUUUGG"))))

(deftest stops-translation-if-stop-codon-present
  (is (= ["Methionine" "Phenylalanine"] (protein-translation/translate-rna "AUGUUUUAA"))))

(deftest stops-translation-of-longer-strand
  (is (= ["Tryptophan" "Cysteine" "Tyrosine"] (protein-translation/translate-rna "UGGUGUUAUUAAUGGUUU"))))

Version data entries

121 entries across 121 versions & 1 rubygems

Version Path
trackler-2.2.1.119 tracks/clojure/exercises/protein-translation/test/protein_translation_test.clj
trackler-2.2.1.118 tracks/clojure/exercises/protein-translation/test/protein_translation_test.clj
trackler-2.2.1.117 tracks/clojure/exercises/protein-translation/test/protein_translation_test.clj
trackler-2.2.1.116 tracks/clojure/exercises/protein-translation/test/protein_translation_test.clj
trackler-2.2.1.115 tracks/clojure/exercises/protein-translation/test/protein_translation_test.clj
trackler-2.2.1.114 tracks/clojure/exercises/protein-translation/test/protein_translation_test.clj
trackler-2.2.1.113 tracks/clojure/exercises/protein-translation/test/protein_translation_test.clj
trackler-2.2.1.111 tracks/clojure/exercises/protein-translation/test/protein_translation_test.clj
trackler-2.2.1.110 tracks/clojure/exercises/protein-translation/test/protein_translation_test.clj
trackler-2.2.1.109 tracks/clojure/exercises/protein-translation/test/protein_translation_test.clj
trackler-2.2.1.108 tracks/clojure/exercises/protein-translation/test/protein_translation_test.clj
trackler-2.2.1.107 tracks/clojure/exercises/protein-translation/test/protein_translation_test.clj
trackler-2.2.1.106 tracks/clojure/exercises/protein-translation/test/protein_translation_test.clj
trackler-2.2.1.105 tracks/clojure/exercises/protein-translation/test/protein_translation_test.clj
trackler-2.2.1.104 tracks/clojure/exercises/protein-translation/test/protein_translation_test.clj
trackler-2.2.1.103 tracks/clojure/exercises/protein-translation/test/protein_translation_test.clj
trackler-2.2.1.102 tracks/clojure/exercises/protein-translation/test/protein_translation_test.clj
trackler-2.2.1.101 tracks/clojure/exercises/protein-translation/test/protein_translation_test.clj
trackler-2.2.1.100 tracks/clojure/exercises/protein-translation/test/protein_translation_test.clj
trackler-2.2.1.99 tracks/clojure/exercises/protein-translation/test/protein_translation_test.clj