package waket.remote.service;

import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.seasar.extension.jdbc.JdbcManager;
import org.seasar.extension.unit.S2TestCase;
//import org.seasar.framework.container.SingletonS2Container;
//import org.seasar.framework.container.factory.SingletonS2ContainerFactory;

import waket.remote.entity.OnlineUsers;

public class Test extends S2TestCase{
	public static Log logger = LogFactory.getLog(Test.class);
	
	public JdbcManager jdbcManager;

	protected void setUp() throws Exception{
		include("app.dicon");
	}
	public void testExecute() throws Exception{
//		SingletonS2ContainerFactory
//			.init();
//		jdbcManager = SingletonS2Container
//			.getComponent("jdbcManager");

		List<OnlineUsers> list2 = jdbcManager
			.selectBySqlFile(
				OnlineUsers.class,
				"waket.remote.service.Test.sql")
			.getResultList();
			
		assertNotNull(list2);
		
		
		for (OnlineUsers user : list2) {
			logger.debug(user.address);
		}

	}
}
