/** * CA-8 - Deve ser validado se todas as peças obrigatórias à classe foram inseridas * * @throws Exception * @throws IOException */ @Test public void peticionar_ClasseSemPecaObrigatoria_PeticaoInvalidaException() throws IOException, Exception { PeticaoDto peticaoDto = builder.buildPeticaoInicialPadrao(pessoaRepository); peticaoDto.setPecas(builder.buildListaDePecasSemPeticaoInicial()); ResultActions result = invocaTeste(peticaoDto); result.andExpect(status().isBadRequest()); }
/** * CA-5 - Deve existir pelo menos uma peça * * @throws Exception * @throws IOException */ @Test public void peticionar_NenhumArquivoEnviado_PeticaoInvalidaException() throws IOException, Exception { PeticaoDto peticaoDto = builder.buildPeticaoInicialPadrao(pessoaRepository); peticaoDto.setPecas(builder.buildListaDePecasVazia()); ResultActions result = invocaTeste(peticaoDto); result.andExpect(status().isBadRequest()); }