我对安卓开发还比较新,正在努力理解bundle的工作原理。
以下单元测试阻塞了我。有人可以解释一下为什么它失败了吗?
@Test
public void testBundle() throws Exception {
Bundle bundle = new Bundle();
String key = "hello";
String value = "world";
bundle.putString(key, value);
Assert.assertEquals(value, bundle.getString(key));
}
junit.framework.ComparisonFailure:
Expected :world
Actual :null