Skip to content

Commit

Permalink
Acronym: Replace [<TestCase>] tests with individual tests (exercism#298
Browse files Browse the repository at this point in the history
…) (exercism#299)

* Fix exercism#286 - Linked List: change pop and shift to return option

* Linked List: Add missing Ignore attribute

* Markdown: Use correct tags for italic and bold text

* Revert "Fix exercism#286 - Linked List: change pop and shift to return option"

This reverts commit 9da0115.

* Acronym: Replace [<TestCase>] tests with individual tests (exercism#298)

* acronym: Add missing [<TestCase>] attribute

* Add missing [<Ignore>] attributes
  • Loading branch information
balazsbotond authored and robkeim committed Feb 9, 2017
1 parent 2740569 commit 8445219
Showing 1 changed file with 56 additions and 9 deletions.
65 changes: 56 additions & 9 deletions exercises/acronym/AcronymTest.fs
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,59 @@ open Acronym
[<Test>]
let ``Empty string abbreviated to empty string`` () =
Assert.That(acronym "", Is.EqualTo(""))

[<TestCase("Portable Network Graphics", ExpectedResult = "PNG", Ignore = "Remove to run test case")>]
[<TestCase("Ruby on Rails", ExpectedResult = "ROR", Ignore = "Remove to run test case")>]
[<TestCase("HyperText Markup Language", ExpectedResult = "HTML", Ignore = "Remove to run test case")>]
[<TestCase("First In, First Out", ExpectedResult = "FIFO", Ignore = "Remove to run test case")>]
[<TestCase("PHP: Hypertext Preprocessor", ExpectedResult = "PHP", Ignore = "Remove to run test case")>]
[<TestCase("Complementary metal-oxide semiconductor", ExpectedResult = "CMOS", Ignore = "Remove to run test case")>]
let ``Phrase abbreviated to acronym`` (phrase: string) =
acronym phrase

[<Test>]
[<Ignore("Remove to run test")>]
let ``Basic`` () =
let phrase = "Portable Network Graphics"
let expected = "PNG"
let actual = acronym phrase
Assert.That(expected, Is.EqualTo(actual))

[<Test>]
[<Ignore("Remove to run test")>]
let ``Lowercase words`` () =
let phrase = "Ruby on Rails"
let expected = "ROR"
let actual = acronym phrase
Assert.That(expected, Is.EqualTo(actual))

[<Test>]
[<Ignore("Remove to run test")>]
let ``Camel case`` () =
let phrase = "HyperText Markup Language"
let expected = "HTML"
let actual = acronym phrase
Assert.That(expected, Is.EqualTo(actual))

[<Test>]
[<Ignore("Remove to run test")>]
let ``Punctuation`` () =
let phrase = "First In, First Out"
let expected = "FIFO"
let actual = acronym phrase
Assert.That(expected, Is.EqualTo(actual))

[<Test>]
[<Ignore("Remove to run test")>]
let ``All-Caps words`` () =
let phrase = "PHP: Hypertext Preprocessor"
let expected = "PHP"
let actual = acronym phrase
Assert.That(expected, Is.EqualTo(actual))

[<Test>]
[<Ignore("Remove to run test")>]
let ``Non-acronym all-caps word`` () =
let phrase = "GNU Image Manipulation Program"
let expected = "GIMP"
let actual = acronym phrase
Assert.That(expected, Is.EqualTo(actual))

[<Test>]
[<Ignore("Remove to run test")>]
let ``Hyphenated`` () =
let phrase = "Complementary metal-oxide semiconductor"
let expected = "CMOS"
let actual = acronym phrase
Assert.That(expected, Is.EqualTo(actual))

0 comments on commit 8445219

Please sign in to comment.