|
Line 15-18: If we find a tag that is not in the allowed tags tuple, then remove it as well.
|
|
|
第15-18行:如果我们发现一个不在被允许标志元组中的标志,然后移除它。 |
|
Line 16-17: Make sure an entry for our subscriber key exists. If not, create an empty one.
|
|
|
第16–17行:确保我们的订户关键字存在。如果没有的话,创建一个空的。 |
|
Line 16-19: In the constructor we are extracting the two new arguments and send the rest to the constructor of the Text field (line 21).
|
|
|
第16-19行:在构造器里我们提取了两个新参数并且把馀下来的给文本字符段的构造器(21行)。 |
|
Line 19-21: Obviously, we pretend to have one more object than we actually have.
|
|
|
第19-21行:很明显,我们假定拥有比我们真正拥有的对象还多一个。 |
|
Line 20-21: Since there is a specific adapter registration required for each case (board and message), we will have to leave that up to the test case implementation as well.
|
|
|
第20-21行:因为每个案例(栏和消息)都要求注册一个相应的适配器,所以我们同样也必须使之适应测试案例实施。 |
|
Line 20-36: These are the three handler methods that handle the various events.
|
|
|
第20-36行:这里有三个处理方法用以处理不同的事件。 |
|
Line 24: Grab the folder that contains the message board.
|
|
|
第24行:得到包含消息栏的文件夹。 |
|
Line 26-30: Make sure deleting subscriptions works as well.
|
|
|
第26-30行:确认订户删除也运行正常。 |
|
Line 2: Since we use the Text field as base class, we can also use it's test case as base, getting some freebie tests in return.
|
|
|
第2行:既然我们以文本域作为基本类,我们就使用它的测试范例作为基本类,获得一些免费的代码。 |
|
Line 3 Deco chain path return sprocket failed.
|
|
|
3号线印机针链的从动链轮坏了。 |
|
Line 3-5: Make sure we show the title of the message and link it to the actual object.
|
|
|
第3-5行:确定我们需要显示的消息标题和链接的实际对象。 |