#14 开始整理Modules的单元测试,提高测试覆盖率,并顺手改进代码。

This commit is contained in:
Calvin
2012-05-05 23:39:31 +08:00
parent da2440535c
commit e819fbcefd
50 changed files with 271 additions and 451 deletions
@@ -11,7 +11,7 @@ import org.springside.examples.showcase.common.dao.UserJpaDao;
import org.springside.examples.showcase.common.entity.User;
import org.springside.examples.showcase.common.service.AccountManager;
import org.springside.examples.showcase.common.service.ServiceException;
import org.springside.modules.test.security.shiro.ShiroTestHelper;
import org.springside.modules.test.security.shiro.ShiroTestUtils;
public class AccountManagerTest {
@@ -22,7 +22,7 @@ public class AccountManagerTest {
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
ShiroTestHelper.mockSubject("foo");
ShiroTestUtils.mockSubject("foo");
accountManager = new AccountManager();
accountManager.setUserJpaDao(mockUserDao);
@@ -30,7 +30,7 @@ public class AccountManagerTest {
@After
public void tearDown() {
ShiroTestHelper.clearSubject();
ShiroTestUtils.clearSubject();
}
@Test