1
resposta

teste ignorado

tá dando um erro aqui quando eu rodo a classe:

"12:50:04.923 [main] DEBUG org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Neither @ContextConfiguration nor @ContextHierarchy found for test class [ConsultaControllerTest]: using SpringBootContextLoader 12:50:04.926 [main] DEBUG org.springframework.test.context.support.AbstractContextLoader - Could not detect default resource locations for test class [controller.ConsultaControllerTest]: no resource found for suffixes {-context.xml, Context.groovy}. 12:50:04.926 [main] INFO org.springframework.test.context.support.AnnotationConfigContextLoaderUtils - Could not detect default configuration classes for test class [controller.ConsultaControllerTest]: ConsultaControllerTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. 12:50:04.955 [main] DEBUG org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Using ContextCustomizers for test class [ConsultaControllerTest]: [ImportsContextCustomizer, ExcludeFilterContextCustomizer, DuplicateJsonObjectContextCustomizer, MockitoContextCustomizer, TestRestTemplateContextCustomizer, DisableObservabilityContextCustomizer, PropertyMappingContextCustomizer, Customizer]

Test ignored. java.lang.NullPointerException: Cannot invoke "java.lang.Class.getName()" because "found" is null"

Eu acho que talvez algum import tenha sido errado aqui. Uma dica pra esses vídeos que tem vários imports que tem outros parecidos é colocar no final da transcrição da aula a lista com todos os imports que foram usados pro pessoal poder chegar certinho se pegou dos pacotes certos.

1 resposta

Oi Thiago!

Posta sua classe de teste completa aqui.