Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1 | espaco | 1 | package br.gov.al.saude.test.builder; |
| 2 | |||
| 3 | import java.util.Date; |
||
| 4 | |||
| 5 | import br.gov.al.saude.rhd.model.Cronograma; |
||
| 6 | import br.gov.al.saude.test.unidade.generic.builder.AbstractEntidadeBuilder; |
||
| 7 | import br.gov.al.saude.test.util.StringUtils; |
||
| 8 | |||
| 9 | public class CronogramaBuilder extends AbstractEntidadeBuilder<Cronograma> { |
||
| 10 | |||
| 11 | public CronogramaBuilder comNumeroAno(String numeroAno) { |
||
| 12 | entidade.setNumeroAno(StringUtils.valueLong(numeroAno)); |
||
| 13 | return this; |
||
| 14 | } |
||
| 15 | |||
| 16 | public CronogramaBuilder comNumeroAno(Long numeroAno) { |
||
| 17 | entidade.setNumeroAno(numeroAno); |
||
| 18 | return this; |
||
| 19 | } |
||
| 20 | |||
| 21 | public CronogramaBuilder comDataCadastro(String dataCadastro) { |
||
| 22 | entidade.setDataCadastro(StringUtils.valueDate(dataCadastro)); |
||
| 23 | return this; |
||
| 24 | } |
||
| 25 | |||
| 26 | @Override |
||
| 27 | protected void inicializarDadosDefault() { |
||
| 28 | entidade = new Cronograma(); |
||
| 29 | entidade.setDataCadastro(new Date()); |
||
| 30 | } |
||
| 31 | |||
| 32 | } |