Sha256: 9e95d7c2955ddf4d974bd3916db85f2753f24c3260cb6196afaad2c7717ddf17

Contents?: true

Size: 1.38 KB

Versions: 54

Compression:

Stored size: 1.38 KB

Contents

import "package:test/test.dart";
import "package:rna_transcription/rna_transcription.dart";

void main() {
  final rnaTranscription = new RnaTranscription();

  group("RnaTranscription", () {
    group("#toRna()", () {
      test("transcribes cytosine to guanine", () {
        final result = rnaTranscription.toRna("C");

        expect(result, equals("G"));
      });

      test("transcribes guanine to cytosine", () {
        final result = rnaTranscription.toRna("G");

        expect(result, equals("C"));
      }, skip: false);

      test("transcribes adenine to uracil", () {
        final result = rnaTranscription.toRna("A");

        expect(result, equals("U"));
      }, skip: false);

      test("transcribes thymine to adenine", () {
        final result = rnaTranscription.toRna("T");

        expect(result, equals("A"));
      }, skip: false);

      test("transcribes all dna nucleotides to their rna complements", () {
        final result = rnaTranscription.toRna("ACGTGGTCTTAA");

        expect(result, equals("UGCACCAGAAUU"));
      }, skip: false);

      test("correctly handles completely invalid input", () {
        expect(() => rnaTranscription.toRna("XXX"), throwsArgumentError);
      }, skip: false);

      test("correctly handles partially invalid input", () {
        expect(() => rnaTranscription.toRna("ACGTXXXCTTAA"), throwsArgumentError);
      }, skip: false);
    });
  });
}

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
trackler-2.2.1.39 tracks/dart/exercises/rna-transcription/test/rna_transcription_test.dart
trackler-2.2.1.38 tracks/dart/exercises/rna-transcription/test/rna_transcription_test.dart
trackler-2.2.1.37 tracks/dart/exercises/rna-transcription/test/rna_transcription_test.dart
trackler-2.2.1.36 tracks/dart/exercises/rna-transcription/test/rna_transcription_test.dart
trackler-2.2.1.35 tracks/dart/exercises/rna-transcription/test/rna_transcription_test.dart
trackler-2.2.1.34 tracks/dart/exercises/rna-transcription/test/rna_transcription_test.dart
trackler-2.2.1.33 tracks/dart/exercises/rna-transcription/test/rna_transcription_test.dart
trackler-2.2.1.32 tracks/dart/exercises/rna-transcription/test/rna_transcription_test.dart
trackler-2.2.1.31 tracks/dart/exercises/rna-transcription/test/rna_transcription_test.dart
trackler-2.2.1.30 tracks/dart/exercises/rna-transcription/test/rna_transcription_test.dart
trackler-2.2.1.29 tracks/dart/exercises/rna-transcription/test/rna_transcription_test.dart
trackler-2.2.1.28 tracks/dart/exercises/rna-transcription/test/rna_transcription_test.dart
trackler-2.2.1.27 tracks/dart/exercises/rna-transcription/test/rna_transcription_test.dart
trackler-2.2.1.26 tracks/dart/exercises/rna-transcription/test/rna_transcription_test.dart
trackler-2.2.1.25 tracks/dart/exercises/rna-transcription/test/rna_transcription_test.dart
trackler-2.2.1.24 tracks/dart/exercises/rna-transcription/test/rna_transcription_test.dart
trackler-2.2.1.23 tracks/dart/exercises/rna-transcription/test/rna_transcription_test.dart
trackler-2.2.1.22 tracks/dart/exercises/rna-transcription/test/rna_transcription_test.dart
trackler-2.2.1.21 tracks/dart/exercises/rna-transcription/test/rna_transcription_test.dart
trackler-2.2.1.20 tracks/dart/exercises/rna-transcription/test/rna_transcription_test.dart