Add test generator for rna transcription exercise#353
Add test generator for rna transcription exercise#353ErikSchierboom merged 3 commits intoexercism:masterfrom
Conversation
| }; | ||
|
|
||
| public static string OfDna(string nucleotide) | ||
| public static string ToRna(string nucleotide) |
There was a problem hiding this comment.
The build fails because this (example) class' name has not been renamed to RnaTranscription.
There was a problem hiding this comment.
Thanks, I fixed that and updated the PR.
| [Fact(Skip = "Remove to run test")] | ||
| public void Correctly_handles_invalid_input_rna_instead_of_dna_() | ||
| { | ||
| Assert.Equal(null, RnaTranscription.ToRna("U")); |
There was a problem hiding this comment.
Should we return null or throw an exception?
There was a problem hiding this comment.
Either way has it's pros and cons, but now that I think about other exercises they're mostly throwing exceptions, so for consistency it probably makes sense to head in that direction.
| { | ||
| foreach (var canonicalDataCase in CanonicalData.Cases) | ||
| { | ||
| canonicalDataCase.Expected = canonicalDataCase.Expected ?? new UnescapedValue("null"); |
There was a problem hiding this comment.
This is not ideal and should not be necessary. A null value should be displayed as null. I'll try and fix that.
|
@ErikSchierboom I fixed this generator, could you take a look when you get a chance? |
|
Thanks! :tada |
And another for #195