Again, the separate method for handling faults is not strictly necessary, but is a good practice.
在这里,处理故障的单独方法也不是绝对必要的,但使用它是一项良好的习惯。
For example, say I want to move the block of code after the call to map.get in Listing 3 to a separate method.
例如,假设我想要在调用了清单3中的map . get后,将代码块移到另外一个方法。
To accomplish this, you can wrap the three lines of code produced by the recorder into a separate method in your test script.
要完成这项操作,可以将记录器生成的三行代码封装到测试脚本的某个单独方法中。
应用推荐