Listing 6 contains two segments, a form and its result page, separated by a conditional test.
清单6包含两个部分,一个表单和它的结果页面,使用一个条件检验分隔。
As in most every language, Scala's if evaluates a conditional expression, then proceeds to a block if the result is true or branches to an alternate block if the result is false. A simple example.
和大多数语言一样,Scala的if测试一个条件表达式,然后根据结果为真或假来跳转到响应语句块中。
You run all tests against the Presentation Model because it contains the conditional logic and a hold place for the state that changes as a result of executing it.
针对Presentation Model运行所有测试,因为Presentation Model包含有条件的逻辑和一个储存随执行而更改的状态的空间。
应用推荐