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.1.0.45 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.1.0.44 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.1.0.43 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.1.0.42 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.1.0.41 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.1.0.40 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.1.0.39 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.1.0.38 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.1.0.37 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.1.0.36 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.1.0.34 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.1.0.33 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.1.0.32 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.1.0.31 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.1.0.30 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.1.0.29 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.1.0.28 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.1.0.27 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.1.0.26 tracks/fsharp/exercises/book-store/BookStoreTest.fs
trackler-2.1.0.25 tracks/fsharp/exercises/book-store/BookStoreTest.fs