Our simple testable class will return whatever string we pass in, so let's start evaluating the results. If we were coding raw JUnit classes we would write something like this
我们建立的简单的可测试的类将返回传递的任何字符串,所以让我们评估一下这个结果。
We intended for makeList to return a List[String], but when strings.length equals zero, we returned List(0), incorrectly “assuming” that this expression is the correct way to create an empty list.
我们希望makeList能返回一个List[String],但是当strings.length等于0 时,我们错误地假设List(0)是一个空的列表并且将其返回。
In all other cases where we cannot find the beginning of a tag, we return the empty string.
在无法找到标签开头的其他所有情况下,我们返回一个空字符串。
For the purpose of our mediation, we will return information from the session object in string form so it can be written to the logs. Enter the following method into the mediation handler class.
为了我们中介的目的,我们将从会话对象使用字符串形式来返回信息,以方便日志的写入。
For the purpose of our mediation, we will return information from the session object in string form so it can be written to the logs. Enter the following method into the mediation handler class.
为了我们中介的目的,我们将从会话对象使用字符串形式来返回信息,以方便日志的写入。
应用推荐