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

import org.junit.Assert;
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.ws.client.platea.service.PlateaService;

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

	@Autowired
	private PlateaService plateaService;

	@Test
	@Transactional(propagation = Propagation.SUPPORTS)
	@Rollback(false)
	public void testGetProcedure() {
		String procedureID = "0087002";
		try {
			com.ejie.ad74a.ws.client.platea.procedimientos.TProcedureList procedure = this.plateaService
					.getProcedure(procedureID);
			System.out.println("Procedimientos: " + procedure);
		} catch (Throwable e) {
			e.printStackTrace();
			Assert.fail("Error al recuperar el procedimiento");
		}
		// Assert.assertTrue("Se ha encontrado un registro que no existe", true);
	}

}
