数据库单元测试
摘要:package com.hichina.bc.repository.test;import junit.framework.Assert;import org.hibernate.SessionFactory;import org.junit.Test;import org.junit.runner.RunWith;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.test.context.ContextConfiguration;import org.springf
阅读全文
posted @
2011-09-22 22:40
xhan
阅读(414)
推荐(0)
解耦配置文件依赖,让单元测试跑起来
摘要:现在很多人都开始使用ioc框架了。新公司里也项目已在使用unity来管理对象依赖。将对象之间的依赖从程序里面放到配置文件里面,确实是我们的系统更加的灵活了我们能很容易的通过替换对象来实现程序的功能切换。另外的一个好处我觉得很多人都不太重视。那就是对象间的解耦给自动化的单元测试提供了可能性想象下我们测试我们的业务逻辑代码。如果业务逻辑代码使用了数据库,网络。比如处理一个订单这个用例。这个用例包括根据...
阅读全文
posted @
2010-06-13 16:22
xhan
阅读(524)
推荐(0)
Tame Your Software Dependencies for More Flexible Apps
摘要:http://msdn.microsoft.com/en-us/magazine/cc337885.aspx 收藏回去看!
阅读全文
posted @
2009-06-23 18:02
xhan
阅读(180)
推荐(0)