package com.jasamedika.medifirst2000.dao.test;

/**Agama Class Test
 */

import static org.junit.Assert.*;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import com.jasamedika.medifirst2000.dao.LoginUserDao;
import com.jasamedika.medifirst2000.entities.LoginUser;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath*:com/jasamedika/**/applicationContext.xml")
public class LoginUserDaoTest {

	@Autowired
	private LoginUserDao dao;

	@Test
	public void testFindById() {
		try {
			LoginUser result = dao.findOne(new Integer(1));
			assertNotNull(result);
		} catch (Exception ex) {
			ex.printStackTrace();
		}
		// System.out.println(result.getAlamats().size());
		// assertNotNull(result.getAlamats());

	}
	
	@Test
	public void testNorec(){
		LoginUser loginUser = new LoginUser();
		assertNotNull(loginUser.getNoRec());
	}
}
