FunctionalProgrammingSimplified
FunctionalProgrammingSimplified copied to clipboard
batchOfCookies not used. And unused cookies is not cool!
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)
}