【发布时间】:2017-10-12 23:30:48
【问题描述】:
所以我是 scala 的新手,我需要检查 List 是否不包含元素。
这是我正在尝试编写的代码,但显然我的语法是错误的,我不知道该怎么做:
it should "return unique slugs for all category" in {
val allCategories = categoryService.getAllCategories("rocket")
val checkedCategories = List()
allCategories.foreach(
category => checkedCategories should notContains category.slug
)
}
【问题讨论】: