public void testSerializationComptibility() throws Exception {
final BeanContextServicesSupport ctx = new BeanContextServicesSupport(
null, Locale.ITALY, true, true);
final BeanContextServicesSupport ctx2 = new BeanContextServicesSupport(
null, Locale.CHINA, true, true);
BeanContextEvent event = new MockBeanContextEvent(ctx);
event.setPropagatedFrom(ctx2);
SerializationTest.verifyGolden(this, event, new SerializableAssert(){
public void assertDeserialized(Serializable arg0, Serializable arg1) {
BeanContextEvent e1 = (BeanContextEvent)arg0;
BeanContextEvent e2 = (BeanContextEvent)arg1;
assertNull((BeanContextServicesSupport)e2.getSource());
assertNotNull((BeanContextServicesSupport)e1.getSource());
assertEqualsSerially((BeanContextServicesSupport)e1.getPropagatedFrom(), (BeanContextServicesSupport)e2.getPropagatedFrom());
assertEqualsSerially(ctx2, (BeanContextServicesSupport)e2.getPropagatedFrom());
}
});
}
BeanContextEventTest.java 文件源码
java
阅读 25
收藏 0
点赞 0
评论 0
项目:cn1
作者:
评论列表
文章目录