logintest.java

来自「上网计费系统,适用网吧或者自己学习用用JAVA写成」· Java 代码 · 共 51 行

JAVA
51
字号
package com.briup.test;

import static org.junit.Assert.*;

import java.util.List;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import com.briup.dao.bean.Admin;
import com.briup.service.IService;
import com.briup.util.BeanFactory;

/**class LoginTest
 * @author TerryRen
 * @Date 2008-1-8 下午04:24:38
 */
public class LoginTest {

	@Before
	public void setUp() throws Exception {
	}

	/**class LoginTest
	 * @author TerryRen
	 * @Date 2008-1-8 下午04:24:38
	 */

	@After
	public void tearDown() throws Exception {
	}

	@Test
	public void testExecuteActionMappingActionFormHttpServletRequestHttpServletResponse() {
		try{
		IService iService = BeanFactory.getService();
		Admin admin = iService.adminLogin("briup11", "briup");
		assertNotNull("用户名存在",admin);
		List roles = iService.getAllRoles();
		assertNotNull("角色存在",roles);
		List products = iService.getAllProducts();
		assertNotNull("产品存在",products);
		}catch(Exception e){
			fail("Not yet implemented");
		}
		
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?