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