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.service.toolkit.ToolkitService;

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

	@Autowired
	private ToolkitService toolkitService;

	@Test
	@Transactional(propagation = Propagation.SUPPORTS)
	@Rollback(false)
	public void testGetMotivosBaja() throws Exception {
		String motivos = toolkitService.getMotivosBaja();
		System.out.println(motivos);
		Assert.assertTrue("Se ha encontrado un registro que no existe", motivos != null);
	}

}
