GH-806 - Remove use of Lombok.
Co-authored-by: Oliver Drotbohm <oliver.drotbohm@broadcom.com>
This commit is contained in:
committed by
Oliver Drotbohm
parent
d3de9578f8
commit
80f6086034
@@ -18,11 +18,8 @@ package org.springframework.modulith.events;
|
||||
import static org.assertj.core.api.Assertions.*;
|
||||
import static org.springframework.modulith.events.EventExternalizationConfiguration.*;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -160,11 +157,14 @@ class EventExternalizationConfigurationUnitTests {
|
||||
@Externalized("::key")
|
||||
static class KeyOnlyAnnotated {}
|
||||
|
||||
@RequiredArgsConstructor
|
||||
static class WithKeyProperty {
|
||||
|
||||
private final String key;
|
||||
|
||||
WithKeyProperty(String key) {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
String getKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
@@ -19,8 +19,6 @@ import static org.assertj.core.api.Assertions.*;
|
||||
import static org.mockito.ArgumentMatchers.*;
|
||||
import static org.mockito.Mockito.*;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -132,8 +130,11 @@ class PersistentApplicationEventMulticasterUnitTests {
|
||||
void on(SampleEvent event) {}
|
||||
}
|
||||
|
||||
@AllArgsConstructor
|
||||
static class SampleEvent {
|
||||
public boolean supported;
|
||||
|
||||
public SampleEvent(boolean supported) {
|
||||
this.supported = supported;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,8 +20,6 @@ import static org.junit.jupiter.api.Assumptions.*;
|
||||
import static org.mockito.ArgumentMatchers.*;
|
||||
import static org.mockito.Mockito.*;
|
||||
|
||||
import lombok.Value;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.time.Instant;
|
||||
@@ -485,10 +483,7 @@ class JdbcEventPublicationRepositoryIntegrationTests {
|
||||
@WithOracle
|
||||
class OracleWithDeleteCompletion extends WithDeleteCompletion {}
|
||||
|
||||
@Value
|
||||
private static final class TestEvent {
|
||||
String eventId;
|
||||
}
|
||||
private record TestEvent(String eventId) {}
|
||||
|
||||
private static final class Sample {}
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@ package org.springframework.modulith.events.jpa;
|
||||
import static org.assertj.core.api.Assertions.*;
|
||||
|
||||
import example.ExampleApplication;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.BeanFactory;
|
||||
@@ -36,14 +35,17 @@ import org.springframework.test.context.TestConstructor.AutowireMode;
|
||||
@SpringBootTest
|
||||
@ContextConfiguration(classes = ExampleApplication.class)
|
||||
@TestConstructor(autowireMode = AutowireMode.ALL)
|
||||
@RequiredArgsConstructor
|
||||
class JpaEventPublicationAutoConfigurationIntegrationTests {
|
||||
|
||||
private final BeanFactory factory;
|
||||
|
||||
@MockitoBean EventSerializer serializer;
|
||||
|
||||
@Test // GH-10
|
||||
JpaEventPublicationAutoConfigurationIntegrationTests(BeanFactory factory) {
|
||||
this.factory = factory;
|
||||
}
|
||||
|
||||
@Test // GH-10
|
||||
void registersJpaEventPublicationPackageForAutoConfiguration() {
|
||||
|
||||
var examplePackage = ExampleApplication.class.getPackageName();
|
||||
|
||||
@@ -18,7 +18,6 @@ package org.springframework.modulith.events.jpa;
|
||||
import static org.assertj.core.api.Assertions.*;
|
||||
|
||||
import example.ExampleApplication;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
@@ -36,14 +35,17 @@ import org.springframework.test.context.TestConstructor.AutowireMode;
|
||||
*/
|
||||
@SpringBootTest(classes = ExampleApplication.class)
|
||||
@TestConstructor(autowireMode = AutowireMode.ALL)
|
||||
@RequiredArgsConstructor
|
||||
class JpaEventPublicationConfigurationIntegrationTests {
|
||||
|
||||
private final ApplicationContext context;
|
||||
|
||||
@MockitoBean EventSerializer serializer;
|
||||
|
||||
@Test
|
||||
JpaEventPublicationConfigurationIntegrationTests(ApplicationContext context) {
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
@Test
|
||||
void bootstrapsApplicationComponents() {
|
||||
|
||||
assertThat(context.getBean(EventPublicationRegistry.class)).isNotNull();
|
||||
|
||||
@@ -325,8 +325,5 @@ class JpaEventPublicationRepositoryIntegrationTests {
|
||||
em.persist(new JpaEventPublication(UUID.randomUUID(), date.toInstant(ZoneOffset.UTC), "", "", Object.class));
|
||||
}
|
||||
|
||||
@lombok.Value
|
||||
private static final class TestEvent {
|
||||
String eventId;
|
||||
}
|
||||
private record TestEvent(String eventId) {}
|
||||
}
|
||||
|
||||
@@ -18,8 +18,6 @@ package org.springframework.modulith.events.mongodb;
|
||||
import static org.assertj.core.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assumptions.*;
|
||||
|
||||
import lombok.Value;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.ZoneOffset;
|
||||
@@ -312,8 +310,5 @@ class MongoDbEventPublicationRepositoryTest {
|
||||
@TestPropertySource(properties = CompletionMode.PROPERTY + "=DELETE")
|
||||
static class WithDeleteCompletionTest extends MongoDbEventPublicationRepositoryTest {}
|
||||
|
||||
@Value
|
||||
private static final class TestEvent {
|
||||
String eventId;
|
||||
}
|
||||
private record TestEvent(String eventId) {}
|
||||
}
|
||||
|
||||
@@ -19,8 +19,6 @@ import static org.assertj.core.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assumptions.*;
|
||||
import static org.mockito.Mockito.*;
|
||||
|
||||
import lombok.Value;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.List;
|
||||
@@ -306,10 +304,7 @@ class Neo4jEventPublicationRepositoryTest {
|
||||
@TestPropertySource(properties = CompletionMode.PROPERTY + "=DELETE")
|
||||
static class WithDeleteCompletionTest extends Neo4jEventPublicationRepositoryTest {}
|
||||
|
||||
@Value
|
||||
static class TestEvent {
|
||||
String eventId;
|
||||
}
|
||||
private record TestEvent(String eventId) {}
|
||||
|
||||
@Import({ TestApplication.class })
|
||||
@Configuration
|
||||
|
||||
Reference in New Issue
Block a user