Skip to content

Commit

Permalink
isogram: Replace [<TestCase>] tests with individual tests (exercism#298)
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsbotond committed Feb 10, 2017
1 parent 5e18ac6 commit 68773d4
Showing 1 changed file with 62 additions and 12 deletions.
74 changes: 62 additions & 12 deletions exercises/isogram/IsogramTest.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,65 @@ open NUnit.Framework

open Isogram

[<TestCase("duplicates", ExpectedResult = true)>]
[<TestCase("eleven", ExpectedResult = false, Ignore = "Remove to run test case")>]
[<TestCase("subdermatoglyphic", ExpectedResult = true, Ignore = "Remove to run test case")>]
[<TestCase("Alphabet", ExpectedResult = false, Ignore = "Remove to run test case")>]
[<TestCase("thumbscrew-japingly", ExpectedResult = true, Ignore = "Remove to run test case")>]
[<TestCase("Hjelmqvist-Gryb-Zock-Pfund-Wax", ExpectedResult = true, Ignore = "Remove to run test case")>]
[<TestCase("Heizölrückstoßabdämpfung", ExpectedResult = true, Ignore = "Remove to run test case")>]
[<TestCase("the quick brown fox", ExpectedResult = false, Ignore = "Remove to run test case")>]
[<TestCase("Emily Jung Schwartzkopf", ExpectedResult = true, Ignore = "Remove to run test case")>]
[<TestCase("éléphant", ExpectedResult = false, Ignore = "Remove to run test case")>]
let ``Isogram correctly detects isograms`` (actual: string) =
isogram actual
[<Test>]
let ``Empty string`` () =
let input = ""
let expected = true
let actual = isogram input
Assert.That(actual, Is.EqualTo(expected))

[<Test>]
[<Ignore("Remove to run test")>]
let ``Isogram with only lower case characters`` () =
let input = "isogram"
let expected = true
let actual = isogram input
Assert.That(actual, Is.EqualTo(expected))

[<Test>]
[<Ignore("Remove to run test")>]
let ``Word with one duplicated character`` () =
let input = "eleven"
let expected = false
let actual = isogram input
Assert.That(actual, Is.EqualTo(expected))

[<Test>]
[<Ignore("Remove to run test")>]
let ``Longest reported english isogram`` () =
let input = "subdermatoglyphic"
let expected = true
let actual = isogram input
Assert.That(actual, Is.EqualTo(expected))

[<Test>]
[<Ignore("Remove to run test")>]
let ``Word with duplicated character in mixed case`` () =
let input = "Alphabet"
let expected = false
let actual = isogram input
Assert.That(actual, Is.EqualTo(expected))

[<Test>]
[<Ignore("Remove to run test")>]
let ``Hypothetical isogrammic word with hyphen`` () =
let input = "thumbscrew-japingly"
let expected = true
let actual = isogram input
Assert.That(actual, Is.EqualTo(expected))

[<Test>]
[<Ignore("Remove to run test")>]
let ``Isogram with duplicated non letter character`` () =
let input = "Hjelmqvist-Gryb-Zock-Pfund-Wax"
let expected = true
let actual = isogram input
Assert.That(actual, Is.EqualTo(expected))

[<Test>]
[<Ignore("Remove to run test")>]
let ``Made-up name that is an isogram`` () =
let input = "Emily Jung Schwartzkopf"
let expected = true
let actual = isogram input
Assert.That(actual, Is.EqualTo(expected))

0 comments on commit 68773d4

Please sign in to comment.