Hibernate:
insert
into
medicos
(ativo, crm, email, bairro, cep, cidade, complemento, logradouro, numero, uf, especialidade, nome, telefone)
values
(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Hibernate:
insert
into
pacientes
(ativo, cpf, email, bairro, cep, cidade, complemento, logradouro, numero, uf, nome, telefone)
values
(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Hibernate:
insert
into
consultas
(data, medico_id, motivo_cancelamento, paciente_id)
values
(?, ?, ?, ?)
Hibernate:
select
m1_0.id,
m1_0.ativo,
m1_0.crm,
m1_0.email,
m1_0.bairro,
m1_0.cep,
m1_0.cidade,
m1_0.complemento,
m1_0.logradouro,
m1_0.numero,
m1_0.uf,
m1_0.especialidade,
m1_0.nome,
m1_0.telefone
from
medicos m1_0
where
m1_0.ativo=1
and m1_0.especialidade=?
and m1_0.id not in (select
c1_0.medico_id
from
consultas c1_0
where
c1_0.data=?
and c1_0.motivo_cancelamento is null)
order by
rand()
limit
1
org.opentest4j.AssertionFailedError:
expected: null
but was: med.voll.api.domain.medico.Medico@45
Expected :null
Actual :med.voll.api.domain.medico.Medico@45
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
at med.voll.api.domain.medico.MedicoRepositoryTest.escolherMedicoAleatorioLivreNaDataCenario1(MedicoRepositoryTest.java:54)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
2024-07-10T12:19:28.918-03:00 INFO 124 --- [api] [ionShutdownHook] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
2024-07-10T12:19:28.929-03:00 INFO 124 --- [api] [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
2024-07-10T12:19:29.033-03:00 INFO 124 --- [api] [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.