Sha256: 768032aac7b8fba907d46dcdf3aa4bf35fcd159fd893f1127df52579b56b06c4

Contents?: true

Size: 1.65 KB

Versions: 149

Compression:

Stored size: 1.65 KB

Contents

module AcronymTest

open NUnit.Framework
open Acronym

[<Test>]
let ``Empty string abbreviated to empty string`` () =
    Assert.That(acronym "", Is.EqualTo(""))

[<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))

Version data entries

149 entries across 149 versions & 1 rubygems

Version Path
trackler-2.0.8.40 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.0.8.39 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.0.8.38 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.0.8.37 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.0.8.36 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.0.8.35 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.0.8.34 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.0.8.33 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.0.8.32 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.0.8.31 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.0.8.30 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.0.8.29 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.0.8.28 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.0.8.27 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.0.8.26 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.0.8.24 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.0.8.23 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.0.8.22 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.0.8.21 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.0.8.20 tracks/fsharp/exercises/acronym/AcronymTest.fs