Sha256: eda436ac0b2fb760a8e7c1ffbee87523a4cfc1acf33941dd396c0c7353771fed

Contents?: true

Size: 1.84 KB

Versions: 194

Compression:

Stored size: 1.84 KB

Contents

module BookStoreTest

open System
open NUnit.Framework
open BookStore

[<Test>]
let ``Basket with single book`` () =
    Assert.That(calculateTotalCost [1], Is.EqualTo(8))

[<Ignore("Remove to run test")>]
[<Test>]
let ``Basket with two of same book`` () =
    Assert.That(calculateTotalCost [2; 2], Is.EqualTo(16))

[<Ignore("Remove to run test")>]
[<Test>]
let ``Empty basket`` () =
    Assert.That(calculateTotalCost [], Is.EqualTo(0))

[<Ignore("Remove to run test")>]
[<Test>]
let ``Basket with two different books`` () =
    Assert.That(calculateTotalCost [1; 2], Is.EqualTo(15.2))

[<Ignore("Remove to run test")>]
[<Test>]
let ``Basket with three different books`` () =
    Assert.That(calculateTotalCost [1; 2; 3], Is.EqualTo(21.6))

[<Ignore("Remove to run test")>]
[<Test>]
let ``Basket with four different books`` () =
    Assert.That(calculateTotalCost [1; 2; 3; 4], Is.EqualTo(25.6))

[<Ignore("Remove to run test")>]
[<Test>]
let ``Basket with five different books`` () =
    Assert.That(calculateTotalCost [1; 2; 3; 4; 5], Is.EqualTo(30))

[<Ignore("Remove to run test")>]
[<Test>]
let ``Basket with eight books`` () =
    Assert.That(calculateTotalCost [1; 1; 2; 2; 3; 3; 4; 5], Is.EqualTo(51.20))

[<Ignore("Remove to run test")>]
[<Test>]
let ``Basket with nine books`` () =
    Assert.That(calculateTotalCost [1; 1; 2; 2; 3; 3; 4; 4; 5], Is.EqualTo(55.60))

[<Ignore("Remove to run test")>]
[<Test>]
let ``Basket with ten books`` () =
    Assert.That(calculateTotalCost [1; 1; 2; 2; 3; 3; 4; 4; 5; 5], Is.EqualTo(60))

[<Ignore("Remove to run test")>]
[<Test>]
let ``Basket with eleven books`` () =
    Assert.That(calculateTotalCost [1; 1; 2; 2; 3; 3; 4; 4; 5; 5; 1], Is.EqualTo(68))

[<Ignore("Remove to run test")>]
[<Test>]
let ``Basket with twelve books`` () =
    Assert.That(calculateTotalCost [1; 1; 2; 2; 3; 3; 4; 4; 5; 5; 1; 2], Is.EqualTo(75.20))

Version data entries

194 entries across 194 versions & 1 rubygems

Version Path
trackler-2.2.1.2 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.2.1.1 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.2.1.0 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.2.0.6 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.2.0.5 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.2.0.4 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.2.0.3 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.2.0.2 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.2.0.1 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.2.0.0 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.1.0.55 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.1.0.54 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.1.0.53 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.1.0.52 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.1.0.51 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.1.0.50 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.1.0.49 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.1.0.48 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.1.0.47 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.1.0.46 tracks/fsharp/exercises/book-store/BookStoreTest.fs