(ns rna-transcription.test (:require [clojure.test :refer :all]))
(load-file "rna_transcription.clj")

(deftest transcribes-guanine-to-cytosine
  (is (= "G" (rna-transcription/to-rna "C"))))

(deftest transcribes-cytosine-to-guanine
  (is (= "C" (rna-transcription/to-rna "G"))))

(deftest transcribes-uracil-to-adenine
  (is (= "U" (rna-transcription/to-rna "A"))))

(deftest it-transcribes-thymine-to-uracil
  (is (= "A" (rna-transcription/to-rna "T"))))

(deftest it-transcribes-all-nucleotides
  (is (= "UGCACCAGAAUU" (rna-transcription/to-rna "ACGTGGTCTTAA"))))

(deftest it-validates-dna-strands
  (is (thrown? AssertionError (rna-transcription/to-rna "XCGFGGTDTTAA"))))

(run-tests)

(ns rna-transcription.test (:require [clojure.test :refer :all]))
(load-file "rna_transcription.clj")

(deftest transcribes-cytosine-to-guanine
  (is (= "G" (rna-transcription/to-rna "C"))))

(deftest transcribes-guanine-to-cytosine
  (is (= "C" (rna-transcription/to-rna "G"))))

(deftest transcribes-adenine-to-uracil
  (is (= "U" (rna-transcription/to-rna "A"))))

(deftest it-transcribes-thymine-to-adenine
  (is (= "A" (rna-transcription/to-rna "T"))))

(deftest it-transcribes-all-nucleotides
  (is (= "UGCACCAGAAUU" (rna-transcription/to-rna "ACGTGGTCTTAA"))))

(deftest it-validates-dna-strands
  (is (thrown? AssertionError (rna-transcription/to-rna "XCGFGGTDTTAA"))))

(run-tests)

Make test names match assertions
Make test names match assertions

First it looked like each test name was backwards. Giving the function "C" and transcribing to "G" was named `transcribes-guanine-to-cytosine` rather than `transcribes-cytosine-to-guanine`.

Second, the assertion for "T" -> "A" appeared to be in the right order but it mentioned the wrong nucleotide.

wobh/xclojure,exercism/xclojure,querenker/xclojure,canweriotnow/xclojure,yurrriq/xclojure,exercism/xclojure,querenker/xclojure