package gov.va.med.esr.service;

import gov.va.med.esr.common.model.ee.VerificationInfo;
import gov.va.med.esr.common.model.financials.FinancialStatement;
import gov.va.med.esr.common.model.financials.SpouseFinancials;
import gov.va.med.esr.common.model.lookup.AACIndicator;
import gov.va.med.esr.common.model.lookup.AddressType;
import gov.va.med.esr.common.model.lookup.Country;
import gov.va.med.esr.common.model.lookup.EmploymentStatus;
import gov.va.med.esr.common.model.lookup.EnrollmentPriorityGroup;
import gov.va.med.esr.common.model.lookup.MessageType;
import gov.va.med.esr.common.model.lookup.VAFacility;
import gov.va.med.esr.common.model.person.Person;
import gov.va.med.esr.common.model.person.Spouse;
import gov.va.med.esr.common.model.person.id.PersonIdEntityKeyImpl;
import gov.va.med.esr.common.rule.parameter.EmploymentInputParameter;
import gov.va.med.esr.common.util.RuleAbstractTestCase;
import gov.va.med.fw.rule.SimpleRuleMethod;

import java.math.BigDecimal;
import java.net.URLEncoder;
import java.net.URLDecoder;
import java.util.Calendar;
public class VOAProcessInsuranceTest extends RuleAbstractTestCase {

	public VOAProcessInsuranceTest(String arg0) {
		super(arg0);
	}
//	
//	
//	public void testProcessAddressLine1To3() throws Exception {
//		
//		//VAFacility.CODE_MHV
//		VAFacility fac = this.getLookupService().getVaFacilityByCode(VAFacility.CODE_MHV.getCode());
//		String vpid ="1008590759V367283";
//
//		Person onFile = this.doBuildSimplePerson(true, vpid, null);
//		
////		Person onFile = this.buildSimplePerson();
//
//		Person incoming = this.savePerson(onFile);
//
//		//add simple  Perm address "Clairmont Dr, Atlanta,GA 30305"
//		//with now as updatedDate and null endDate */
//		this.addPermanentAddress(incoming, Calendar.getInstance().getTime(),null);
//		incoming.getPermanentAddress().setLine2("Address Line 2");
//		incoming.getPermanentAddress().setLine3("Address Line 3");
//		incoming.getPermanentAddress().setCountry(null);
//		
//		VerificationInfo vi = new VerificationInfo("x",	MessageType.CODE_ORUZ07_TO_ESR.getCode(), "x");
////		vi.setSiteNumber(incoming.getEligibilityVerification().getVerificationFacility().getCode());
//		Person updated = this.getMessagingService().processVOA(incoming, onFile, fac,vi);
//		
//		assertEquals("CLAIRMONT DR", updated.getPermanentAddress().getLine1());
//		assertEquals("ADDRESS LINE 2", updated.getPermanentAddress().getLine2());
//		assertEquals( "ADDRESS LINE 3", updated.getPermanentAddress().getLine3());
//		//5.5.1.	SUC2031.17.1 - Permanent Address Country Not Required
//		assertEquals(Country.CODE_USA.getName(), updated.getPermanentAddress().getCountry()); //if null, default to United States
//	}	
//	
//	public void testProcessAddressNullLine2To3() throws Exception {
//		
//		//VAFacility.CODE_MHV
//		VAFacility fac = this.getLookupService().getVaFacilityByCode(VAFacility.CODE_MHV.getCode());
//		String vpid ="1008590759V367283";
//
//		Person onFile = this.doBuildSimplePerson(true, vpid, null);
//
//		Person incoming = this.savePerson(onFile);
//
//		//add simple  Perm address "Clairmont Dr, Atlanta,GA 30305"
//		//with now as updatedDate and null endDate */
//		this.addPermanentAddress(incoming, Calendar.getInstance().getTime(),null);
//		//5.4.1.	SUC2031.16.1 - Permanent Street Address Line 2 Not Required
//		//5.4.2.	SUC2031.16.2 - Permanent Street Address Line 3 Not Required
//		incoming.getPermanentAddress().setLine2(null);
//		incoming.getPermanentAddress().setLine3(null);
//		incoming.getPermanentAddress().setCountry(Country.CODE_PHILIPPINES.getName());
//		
//		
//		VerificationInfo vi = new VerificationInfo("x",	MessageType.CODE_ORUZ07_TO_ESR.getCode(), "x");
//		Person updated = this.getMessagingService().processVOA(incoming, onFile, fac,vi);
//
//		assertEquals(Country.CODE_PHILIPPINES.getName(), updated.getPermanentAddress().getCountry()); //if null, default to United States
//		assertEquals("CLAIRMONT DR", updated.getPermanentAddress().getLine1());
//		assertEquals(null, updated.getPermanentAddress().getLine2());
//		assertEquals(null, updated.getPermanentAddress().getLine3());
//	}	
//	
//	//4.2.1.1	SUC2031.3.2.1 - [1469] Process Person Address Data Decision Table
//	public void testProcessAddressDecisionTable_ruleN()
//	{
//		return;
//	}
//	
//	public void testforwardVOAApplication()
//	{
//		String appId = "12345";
//		String vpid ="1008590759V367283";
//		
//		try{
//			this.getVoaApplicationService().forwardVOAApplication(new BigDecimal(appId), this.doBuildSimplePerson(true, vpid, null));
//		}catch (Exception ex)
//		{
//			ex.printStackTrace();
//		}
//	}
}