package com.ejie.ad74a.service.test.interoperabilidad;

import static org.junit.Assert.assertTrue;

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

import com.ejie.ad74a.model.Expedientes;
import com.ejie.ad74a.service.ExpedientesService;
import com.ejie.ad74a.service.interoperabilidad.InteroperabilidadService;
import com.ejie.ad74a.service.interoperabilidad.NisaeService;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = "classpath:test/application-context.xml")
public class TestInteropGetYearIrpfService {

	@Autowired
	private InteroperabilidadService interoperabilidadService;

	@Test
	@Transactional(propagation = Propagation.NOT_SUPPORTED)
	@Rollback(false)
	public void testGetYear() {
		String result = interoperabilidadService.getIRPFYear();
		System.out.println("Resultado: " + result);
		assertTrue("No se lanzado la peticion correctamente", result != null);
	}

}
