Repository navigation
[PETCONTROL-001] Adicionar listagem de espécies - #2
Merged
Merged
Conversation
…r tabelas e inserir dados das especies
rachelpizane
requested changes
Apr 24, 2026
gabicastrum
force-pushed
the
PETCONTROL-001
branch
from
April 24, 2026 15:36
1106ae2 to
60b3802
Compare
gabicastrum
force-pushed
the
PETCONTROL-001
branch
2 times, most recently
from
April 24, 2026 18:18
c2c9c75 to
cddb34d
Compare
…pecies; chore: realizar configuração do setup de testes
rachelpizane
approved these changes
Apr 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 Descrição
Adicionando módulo de listagem de espécies do sistema seguindo a arquitetura em camadas já estabelecida no projeto (controller → service → repository). Inclui migração de banco via Flyway, dados padrão e testes.
Foi também adicionada configurações no application.yaml (configs de JPA e habilitar flyway) e no application-test.yaml (perfil de teste com H2 in-memory. Desabilita o Flyway (enabled: false) e usa ddl-auto: create-drop, criando o schema a partir das entidades automaticamente durante os testes de integração.)
Padrões reutilizáveis neste PR
Separar contrato (com Swagger) da implementação mantém o controller limpo. Permite trocar a implementação sem alterar a documentação da API.
Facilita mocking nos testes e desacopla consumidores da implementação concreta.
Torna inserts de dados padrão idempotentes (seguros para rodar múltiplas vezes)
Centraliza criação de objetos de teste. Novos campos são adicionados em um só lugar, sem quebrar todos os testes.
Unit (Mockito puro) → Web (@WebMvcTest) → Integration (@DataJpaTest).
📷 Anexos
📎 Referências
ADICIONAR ESPECIES