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.0.6.44 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.0.6.43 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.0.6.42 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.0.6.41 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.0.6.40 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.0.6.39 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.0.6.38 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.0.6.37 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.0.6.36 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.0.6.35 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.0.6.34 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.0.6.33 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.0.6.32 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.0.6.31 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.0.6.30 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.0.6.29 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.0.6.28 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.0.6.27 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.0.6.26 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.0.6.25 tracks/fsharp/exercises/book-store/BookStoreTest.fs