From 2b31ee2fc31130d1c16a53963aa84da7f6dd384e Mon Sep 17 00:00:00 2001 From: Erik Schierboom Date: Wed, 8 Mar 2017 19:44:40 +0100 Subject: [PATCH] Replace Theory with multiple Fact tests Refs #194 --- exercises/acronym/AcronymTest.cs | 46 ++++++++++++++++++++++++-------- 1 file changed, 35 insertions(+), 11 deletions(-) diff --git a/exercises/acronym/AcronymTest.cs b/exercises/acronym/AcronymTest.cs index 3ebb91534f..cbb013a121 100644 --- a/exercises/acronym/AcronymTest.cs +++ b/exercises/acronym/AcronymTest.cs @@ -3,20 +3,44 @@ public class AcronymTest { [Fact] - public void Empty_string_abbreviated_to_empty_string() + public void Basic() { - Assert.Equal(string.Empty, Acronym.Abbreviate(string.Empty)); + Assert.Equal("PNG", Acronym.Abbreviate("Portable Network Graphics")); } - [Theory(Skip = "Remove to run test")] - [InlineData("Portable Network Graphics", "PNG")] - [InlineData("Ruby on Rails", "ROR")] - [InlineData("HyperText Markup Language", "HTML")] - [InlineData("First In, First Out", "FIFO")] - [InlineData("PHP: Hypertext Preprocessor", "PHP")] - [InlineData("Complementary metal-oxide semiconductor", "CMOS")] - public void Phrase_abbreviated_to_acronym(string phrase, string expected) + [Fact(Skip = "Remove to run test")] + public void Lowercase_words() { - Assert.Equal(expected, Acronym.Abbreviate(phrase)); + Assert.Equal("ROR", Acronym.Abbreviate("Ruby on Rails")); + } + + [Fact(Skip = "Remove to run test")] + public void Camelcase() + { + Assert.Equal("HTML", Acronym.Abbreviate("HyperText Markup Language")); + } + + [Fact(Skip = "Remove to run test")] + public void Punctuation() + { + Assert.Equal("FIFO", Acronym.Abbreviate("First In, First Out")); + } + + [Fact(Skip = "Remove to run test")] + public void All_caps_words() + { + Assert.Equal("PHP", Acronym.Abbreviate("PHP: Hypertext Preprocessor")); + } + + [Fact(Skip = "Remove to run test")] + public void NonAcronymAllCapsWord() + { + Assert.Equal("GIMP", Acronym.Abbreviate("GNU Image Manipulation Program")); + } + + [Fact(Skip = "Remove to run test")] + public void Hyphenated() + { + Assert.Equal("CMOS", Acronym.Abbreviate("Complementary metal-oxide semiconductor")); } } \ No newline at end of file