Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1 | espaco | 1 | package br.gov.al.saude.rhd.core.domain; |
| 2 | |||
| 3 | import org.jmock.integration.junit4.JMock; |
||
| 4 | import org.junit.Before; |
||
| 5 | import org.junit.runner.RunWith; |
||
| 6 | |||
| 7 | import br.gov.al.saude.framework.core.generic.GenericRepository; |
||
| 8 | import br.gov.al.saude.framework.core.generic.GenericService; |
||
| 9 | import br.gov.al.saude.framework.core.validador.Validador; |
||
| 10 | import br.gov.al.saude.rhd.core.domain.etapa.EtapaService; |
||
| 11 | import br.gov.al.saude.rhd.core.domain.etapa.impl.EtapaServiceImpl; |
||
| 12 | import br.gov.al.saude.rhd.core.infrastructure.persistence.jpa.EtapaRepository; |
||
| 13 | import br.gov.al.saude.rhd.model.Etapa; |
||
| 14 | import br.gov.al.saude.test.unidade.generic.service.ServiceImplTest; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @author Anderson Gomes |
||
| 18 | * @since 10/05/2013 |
||
| 19 | */ |
||
| 20 | |||
| 21 | @RunWith(JMock.class) |
||
| 22 | public class EtapaServiceImplTest extends ServiceImplTest<Etapa> { |
||
| 23 | |||
| 24 | private EtapaService etapaService; |
||
| 25 | private EtapaRepository etapaRepositoryMock; |
||
| 26 | |||
| 27 | @Before |
||
| 28 | public void inicializarContexto() { |
||
| 29 | super.inicializarContexto(); |
||
| 30 | etapaRepositoryMock = getContexto().mock(EtapaRepository.class); |
||
| 31 | validadorMock = getContexto().mock(Validador.class); |
||
| 32 | etapaService = new EtapaServiceImpl(validadorMock, etapaRepositoryMock); |
||
| 33 | } |
||
| 34 | |||
| 35 | @Override |
||
| 36 | protected GenericService<Etapa> getService() { |
||
| 37 | return etapaService; |
||
| 38 | } |
||
| 39 | |||
| 40 | @Override |
||
| 41 | protected GenericRepository<Etapa> getRepositoryMock() { |
||
| 42 | return etapaRepositoryMock; |
||
| 43 | } |
||
| 44 | |||
| 45 | } |