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.jms.service.PlateaJMSService;

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

	@Autowired
	private PlateaJMSService plateaJMSService;

	@Test
	@Transactional(propagation = Propagation.REQUIRED)
	@Rollback(false)
	public void requestAltaMessage() {

		try {
			Long id = 122L;
			this.plateaJMSService.retramitarFromJMSError(id);
		} catch (Throwable e) {
			e.printStackTrace();
			Assert.fail("Error al procesar el message");
		}
		// Assert.assertTrue("Se ha encontrado un registro que no existe", true);
	}

}
