package nuts.core.bean;

import nuts.core.bean.BeanHandler;
import nuts.core.bean.Beans;
import nuts.core.bean.handlers.ListBeanHandler;
import nuts.core.bean.handlers.MapBeanHandler;

import java.util.ArrayList;
import java.util.HashMap;

import junit.framework.TestCase;

public class BeansTest extends TestCase {
	
	public void testBeanHandler() throws Exception {
		Beans bhf = new Beans();
		
		BeanHandler bh = bhf.getBeanHandler(HashMap.class);
		assertEquals(bh.getClass(), MapBeanHandler.class);

		bh = bhf.getBeanHandler(ArrayList.class);
		assertEquals(bh.getClass(), ListBeanHandler.class);
	}
}
