Remove APIs that were deprecated for removal in 3.4.0
Closes gh-41435
This commit is contained in:
@@ -24,6 +24,7 @@ import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
|
||||
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
|
||||
import org.springframework.boot.testcontainers.lifecycle.BeforeTestcontainerUsedEvent;
|
||||
import org.springframework.boot.testcontainers.properties.TestcontainersPropertySource.EventPublisherRegistrar;
|
||||
import org.springframework.context.ApplicationEvent;
|
||||
import org.springframework.context.support.GenericApplicationContext;
|
||||
@@ -134,7 +135,6 @@ class TestcontainersPropertySourceTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("removal")
|
||||
void getPropertyPublishesEvent() {
|
||||
try (GenericApplicationContext applicationContext = new GenericApplicationContext()) {
|
||||
List<ApplicationEvent> events = new ArrayList<>();
|
||||
@@ -146,7 +146,7 @@ class TestcontainersPropertySourceTests {
|
||||
assertThat(applicationContext.getEnvironment().containsProperty("test")).isTrue();
|
||||
assertThat(events.isEmpty());
|
||||
assertThat(applicationContext.getEnvironment().getProperty("test")).isEqualTo("spring");
|
||||
assertThat(events.stream().filter(BeforeTestcontainersPropertySuppliedEvent.class::isInstance)).hasSize(1);
|
||||
assertThat(events.stream().filter(BeforeTestcontainerUsedEvent.class::isInstance)).hasSize(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user