geniomhe-oop-dnapp/tests/Sequence_test.cpp

19 lines
603 B
C++
Raw Normal View History

2023-10-01 12:26:59 +02:00
#include <gtest/gtest.h>
#include "../include/Sequence.hpp"
TEST(TranscriptionTest, BasicTranscription) {
std::string source = "ATG";
std::string target = "AUG";
std::string result = DNASequence(source).transcribe_to_rna().get_sequence();
EXPECT_EQ(target, result);
}
TEST(TranslationTest, BasicTranslation) {
GeneticCode::GetInstance("../resources/codons.txt");
std::string dna_source = "ATGATG";
std::string aa_target = "MM";
std::string result = DNASequence(dna_source).transcribe_to_rna().translate_to_protein().get_sequence();
EXPECT_EQ(aa_target, result);
}