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.2.1.22 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.2.1.21 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.2.1.20 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.2.1.19 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.2.1.18 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.2.1.17 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.2.1.16 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.2.1.15 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.2.1.14 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.2.1.13 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.2.1.12 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.2.1.11 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.2.1.10 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.2.1.9 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.2.1.8 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.2.1.7 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.2.1.6 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.2.1.5 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.2.1.4 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.2.1.3 tracks/fsharp/exercises/acronym/AcronymTest.fs