-
Notifications
You must be signed in to change notification settings - Fork 1
#6 Desenvolvimento de API de Projetos #47
base: develop
Are you sure you want to change the base?
Conversation
…eProjectGateway returns false
…ateway returns true
… thrown in CreateProjectGatewayImpl.create
.../main/java/com/nucleo42/infrastructure/controller/common/ValidateFieldsExceptionHandler.java
Outdated
Show resolved
Hide resolved
usecase/src/main/java/com/nucleo42/usecase/FindAllProjects.java
Outdated
Show resolved
Hide resolved
application/src/test/java/com/nucleo42/application/usecase/AddProjectImplTest.java
Outdated
Show resolved
Hide resolved
application/src/test/java/com/nucleo42/application/usecase/AddProjectImplTest.java
Outdated
Show resolved
Hide resolved
infrastructure/src/main/java/com/nucleo42/infrastructure/dto/UpdateProjectRequestDTO.java
Outdated
Show resolved
Hide resolved
infrastructure/src/main/java/com/nucleo42/infrastructure/dto/CreateProjectRequestDTO.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pelo que vi na implementação do Gateway o update está buscando e atualizando. Injeta um FindProjectGateway
para buscar o project e o update apenas atualiza esse project encontrado.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Está faltando os teste dessa classe
infrastructure/src/main/java/com/nucleo42/infrastructure/service/ProjectGateway.java
Outdated
Show resolved
Hide resolved
infrastructure/src/test/java/com/nucleo42/infrastructure/service/ProjectGatewayTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Falta documentar os parametros que a rota pode receber no swagger
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Está faltando os teste dessa classe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Está faltando os teste dessa classe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Está faltando os teste dessa classe
…e in ProjectGateway
…on when id is invalid
OBS: Adicionei um handler para pegar as validações do Spring Validation, e criei um DTO para retornar erros de uma forma padronizada com todos os campos em uma lista errors: [{ nomeCampo: Erro}, ...], isso se fez necessário para que eu pudesse validar minhas requisições de acordo com o que era inserido.