FunctionalProgrammingSimplified icon indicating copy to clipboard operation
FunctionalProgrammingSimplified copied to clipboard

batchOfCookies not used. And unused cookies is not cool!

Open mgenereu opened this issue 5 years ago • 0 comments

Should it be batchOfCookies or cookies for the variable name?

test("make a batch of chocolate chip cookies") {
    val ingredients = List(
        Flour(3.Cups),
        Butter(1.Cup),
        Egg(2),
        Sugar(1.Cup),
        ChocolateChip(2.Cups)
    )
    val batchOfCookies = GrandmasRecipes.makeCookies(ingredients)
    assert(cookies.count == 12)
    assert(cookies.taste == Taste.JustLikeGrandmasCookies)
    assert(cookies.doughColor == Color.WhiterThanOtherCookies)
}

mgenereu avatar Dec 03 '19 04:12 mgenereu