/*
 * Created on 2005. 5. 19.
 */
package net.javajigi.security.service;

import net.javajigi.security.model.User;

import org.springframework.context.ApplicationContext;

/**
 * @author Administrator
 */
public class SecurityServiceTest extends SecurityBaseTest {
	private ApplicationContext ctx = null;

	
	/*
	 * @see TestCase#tearDown()
	 */
	protected void tearDown() throws Exception {
		super.tearDown();
	}

	protected void setUp() throws Exception {
		super.setUp();
	}

	public void testAuthenticate() throws Exception {
		String userId = "javajigi";
		String password = "password";
		
		User user = addUser(userId, password);
		
		boolean isLogin = getSecurityService().authenticate(userId, password);
		
		assertTrue(isLogin);
		
		getUserManager().removeUser(userId);
	}
}
