Else code block is a simple logical crossroad that helps show why the test would fail or pass if one path - and not another - is taken, according to test expectations.
else代码块是一个简单的逻辑分支,根据测试期望说明选取一条路经——而不是另一条路经——之后测试将失败(或通过)的原因。
In this case, you're using a simple if... Else block to see whether any value stored in the state is accessible via the random key.
在本例中,我们用一个简单的if . . . else块来判断在状态中保存的值是否可通过random键访问。
Typically, these methods are written as one large if-else block or a Map lookup.
通常情况下,这些方法中的代码都有一个大型的if - else语句块或者一个map查找。
应用推荐