1
exercism fetch dart rna-transcription

test/rna_transcription_test.dart

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import 'package:test/test.dart';
import 'package:rna_transcription/rna_transcription.dart';

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

  group('RnaTranscription', () {
    test('transcribes cytosine to guanine', () {
      final String result = rnaTranscription.toRna('C');
      expect(result, equals('G'));
    }, skip: false);

    test('transcribes guanine to cytosine', () {
      final String result = rnaTranscription.toRna('G');
      expect(result, equals('C'));
    }, skip: true);

    test('transcribes adenine to uracil', () {
      final String result = rnaTranscription.toRna('A');
      expect(result, equals('U'));
    }, skip: true);

    test('transcribes thymine to adenine', () {
      final String result = rnaTranscription.toRna('T');
      expect(result, equals('A'));
    }, skip: true);

    test('transcribes all dna nucleotides to their rna complements', () {
      final String result = rnaTranscription.toRna('ACGTGGTCTTAA');
      expect(result, equals('UGCACCAGAAUU'));
    }, skip: true);

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

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