package com.jasamedika.medifirst2000.dao.test;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;

import java.util.Date;
import java.util.List;

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 org.springframework.transaction.annotation.Transactional;

import com.jasamedika.medifirst2000.dao.GenericViewDao;
import com.jasamedika.medifirst2000.dao.PapEliminasiDao;
import com.jasamedika.medifirst2000.dao.PapKeluhanTambahanDao;
import com.jasamedika.medifirst2000.dao.PapKeluhanUtamaDao;
import com.jasamedika.medifirst2000.dao.PasienDao;
import com.jasamedika.medifirst2000.dao.RegistrasiPelayananPasienDao;
import com.jasamedika.medifirst2000.entities.GenericView;
import com.jasamedika.medifirst2000.entities.PapEliminasi;
import com.jasamedika.medifirst2000.entities.PapKeluhanTambahan;
import com.jasamedika.medifirst2000.entities.PapKeluhanUtama;
import com.jasamedika.medifirst2000.entities.PapMuskuloskeletal;
import com.jasamedika.medifirst2000.entities.Pasien;
import com.jasamedika.medifirst2000.entities.RegistrasiPelayananPasien;
import com.jasamedika.medifirst2000.util.DateUtil;

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

	@Autowired
	private PapKeluhanUtamaDao papKeluhanUtamaDao;
	@Autowired
	private PasienDao pasienDao;

	@Test
	@Transactional
	public void testPAPMuskuloskeletalDaoSave() {
		PapKeluhanUtama model = populateModel();
		PapKeluhanUtama resultModel=papKeluhanUtamaDao.save(model);
		assertNotNull(resultModel);
//    	assertEquals(false, resultModel.getIsKelainanTulangAda());
 //   	assertEquals(true, resultModel.getIsGerakanAnakBebas());
		PapKeluhanUtama resultModel2=papKeluhanUtamaDao.findOne("40288cd955ec500d0155ed88a93b0004");
		assertNotNull(resultModel2);
//		assertEquals(false, resultModel2.getIsKelainanTulangAda());
 //   	assertEquals(true, resultModel2.getIsGerakanAnakBebas());
    	resultModel2=populateModelUpdate();
    	PapKeluhanUtama resultModelUpdate=papKeluhanUtamaDao.save(resultModel2);
		assertNotNull(resultModelUpdate);
		assertEquals("abcd", resultModelUpdate.getKeluhanUtama());
    //	assertEquals(false, resultModelUpdate.getIsGerakanAnakBebas());		
    	
	}

	private PapKeluhanUtama populateModel() {
		Pasien pasien=new Pasien();
		pasien.setId(535);
		PapKeluhanUtama keluhanUtama=new PapKeluhanUtama();
		keluhanUtama.setPasien(pasien);
		keluhanUtama.setKeluhanUtama("abc");
		return keluhanUtama;
	}
	
	private PapKeluhanUtama populateModelUpdate() {
		Pasien pasien=new Pasien();
		pasien.setId(535);
		PapKeluhanUtama keluhanUtama=new PapKeluhanUtama();
		keluhanUtama.setPasien(pasien);
		keluhanUtama.setKeluhanUtama("abcd");
		return keluhanUtama;
	}

*/}
