我正在尝试匹配捆绑包(see image)内的值。
我需要验证是否设置了 uriString =" file:///storage/emulated...." 。
但到目前为止,使用我的代码,我可以验证值[1] ="仅由" 提供的福利卡。
intended(IntentMatchers.hasExtras(BundleMatchers.hasValue(hasExtras(BundleMatchers.hasValue("test - Prescription Card")))));
答案 0 :(得分:0)
虽然这是旧的并且可能已经解决,但我认为尝试将 hasExtras
与嵌套的 hasEntry
一起使用是值得注意的。
对于像 -> extras: [Bundle[{key=Bundle[<more data>]}]]
这样的嵌套包
可以试试 -> hasExtras(hasEntry(<key>), hasEntry(<key>, <arg>))