??????4??  ???????????????
????????????????????????hsf??????????????????????????????????bean ???á?
????????????????????????????????????????????junit??????????????hsf?????????hsf?????????????????itest??????????itest??????
????Junit ????????????????????????junit??汾??????4.5 ????
????HSF????????????????hsfunit ??hsf.unit ????????????
????<dependency>
????<groupId>com.taobao.hsf</groupId>
????<artifactId>hsf-standalone</artifactId>
????<version>2.0.4-SNAPSHOT</version>
????</dependency>
????Hsf ??????????????
????// ???HSF???????????????????taobao-hsf.sar·?????????????????HSF?汾
????HSFEasyStarter.start("d:/tmp/"?? "1.4.9.6");
????String springResourcePath = "spring-hsf-uic-consumer.xml";
????ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(springResourcePath);
????UicReadService uicReadService = (UicReadService) ctx.getBean("uicReadService");
????// ??????????????????????sleep???????????????????????????
????ServiceUtil.waitServiceReady(uicReadService);
????BaseUserDO user = uicReadService.getBaseUserByUserId(10000L?? "detail").getModule();
????System.out.println("user[id:10000L] nick:" + user.getNick());
????Hsf bean???????????
????<beans>
????<bean name="uicReadService" class="com.taobao.hsf.app.spring.util.HSFSpringConsumerBean"
????init-method="init">
????<property name="interfaceName" value="com.taobao.uic.common.service.userinfo.UicReadService" />
????<property name="version" value="1.0.0.daily" />
????</bean>
????</beans>
????Itest????????????汾??????????bug??
????<dependency>
????<groupId>com.taobao.test</groupId>
????<artifactId>itest</artifactId>
????<version>1.3.2.1-SNAPSHOT</version>
????<dependency>
??????5??  ?????????У??
????????????????????????????????????????????
????????????????????????????????????????????????????ж?????????????????
??????6??  ?????
????????????????????С??????????????????
?????????????????????????????????????????????????????????review ??????????????????????????????
????3.   ??????????裺
??????1??  checkout?????????????????????????????checkout ????????????
??????2??  ??????????????洢???????????????????????????????洢?????
??????3??  ????????? ???????????????ù????
??????4??  ???????????????????????????????????????????????????????????????????????????????url ????????????
?????????webx??????????http????????????????????????????????????http???????????????????????????????
??????5??  ????????????????????????
??????6??  Review ?????????????·???????
??????7??  ??????????????д????????????з??????????????????????
????4.  ????????????????????????
??????1??  ????????????Null ?????
???????????????????????????????????????????????????null?????????????????????????
???????????μ????
if (mm.getIsRate() == UeModel.IS_RATE_YES) {
float r;
if (value != null && value.indexOf(‘.’) != -1) {
r = currentValue – compareValue;
} else {
r = compareValue == 0 ? 0 : (currentValue – compareValue) / compareValue;
}
if (r >= mm.getIncrLowerBound()) {
score = mm.getIncrScore();
} else if (r <= mm.getDecrUpperBound()) {
score = mm.getDecrScore();
}
mr.setIncreaseRate(formatFloat(r));
} else {
// ????????????????
if (currentValue – compareValue >=mm.getIncrLowerBound()) {
score = mm.getIncrScore();
} else if (currentValue – compareValue <= mm.getDecrUpperBound()) {
score = mm.getDecrScore();
}
}