Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1 | espaco | 1 | package br.gov.al.saude.srv.core.domain; |
| 2 | |||
| 3 | import org.junit.Before; |
||
| 4 | |||
| 5 | import br.gov.al.saude.framework.core.generic.GenericRepository; |
||
| 6 | import br.gov.al.saude.framework.core.generic.GenericService; |
||
| 7 | import br.gov.al.saude.framework.core.validador.Validador; |
||
| 8 | import br.gov.al.saude.srv.core.domain.carreira.CarreiraService; |
||
| 9 | import br.gov.al.saude.srv.core.domain.carreira.impl.CarreiraServiceImpl; |
||
| 10 | import br.gov.al.saude.srv.core.infrastructure.persistence.jpa.carreira.CarreiraRepository; |
||
| 11 | import br.gov.al.saude.srv.model.Carreira; |
||
| 12 | import br.gov.al.saude.test.unidade.generic.service.ServiceImplTest; |
||
| 13 | |||
| 14 | public class CarreiraServiceImplTest extends ServiceImplTest<Carreira> { |
||
| 15 | |||
| 16 | private CarreiraService carreiraService; |
||
| 17 | private CarreiraRepository carreiraRepositoryMock; |
||
| 18 | |||
| 19 | @Before |
||
| 20 | public void inicializarContexto() { |
||
| 21 | carreiraRepositoryMock = getContexto().mock(CarreiraRepository.class); |
||
| 22 | validadorMock = getContexto().mock(Validador.class); |
||
| 23 | carreiraService = new CarreiraServiceImpl(validadorMock, carreiraRepositoryMock); |
||
| 24 | setEntidade(new Carreira()); |
||
| 25 | } |
||
| 26 | |||
| 27 | @Override |
||
| 28 | protected GenericService<Carreira> getService() { |
||
| 29 | return carreiraService; |
||
| 30 | } |
||
| 31 | |||
| 32 | @Override |
||
| 33 | protected GenericRepository<Carreira> getRepositoryMock() { |
||
| 34 | return carreiraRepositoryMock; |
||
| 35 | } |
||
| 36 | } |