mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-09-07 08:17:15 +00:00
📍Use lombok, reformat, and optimize the code (#1560)
* Use lombok, reformat, and optimize the code * Fix merge conflicts and some sonar issues Co-authored-by: va1m <va1m@email.com>
This commit is contained in:
@@ -32,7 +32,7 @@ import org.junit.jupiter.api.Test;
|
||||
/**
|
||||
* Tests for {@link Converter}
|
||||
*/
|
||||
public class ConverterTest {
|
||||
class ConverterTest {
|
||||
|
||||
private final UserConverter userConverter = new UserConverter();
|
||||
|
||||
@@ -40,7 +40,7 @@ public class ConverterTest {
|
||||
* Tests whether a converter created of opposite functions holds equality as a bijection.
|
||||
*/
|
||||
@Test
|
||||
public void testConversionsStartingFromDomain() {
|
||||
void testConversionsStartingFromDomain() {
|
||||
var u1 = new User("Tom", "Hanks", true, "tom@hanks.com");
|
||||
var u2 = userConverter.convertFromDto(userConverter.convertFromEntity(u1));
|
||||
assertEquals(u1, u2);
|
||||
@@ -50,7 +50,7 @@ public class ConverterTest {
|
||||
* Tests whether a converter created of opposite functions holds equality as a bijection.
|
||||
*/
|
||||
@Test
|
||||
public void testConversionsStartingFromDto() {
|
||||
void testConversionsStartingFromDto() {
|
||||
var u1 = new UserDto("Tom", "Hanks", true, "tom@hanks.com");
|
||||
var u2 = userConverter.convertFromEntity(userConverter.convertFromDto(u1));
|
||||
assertEquals(u1, u2);
|
||||
@@ -61,7 +61,7 @@ public class ConverterTest {
|
||||
* instantiated allowing various different conversion strategies to be implemented.
|
||||
*/
|
||||
@Test
|
||||
public void testCustomConverter() {
|
||||
void testCustomConverter() {
|
||||
var converter = new Converter<UserDto, User>(
|
||||
userDto -> new User(
|
||||
userDto.getFirstName(),
|
||||
@@ -85,7 +85,7 @@ public class ConverterTest {
|
||||
* domain users returns an equal collection.
|
||||
*/
|
||||
@Test
|
||||
public void testCollectionConversion() {
|
||||
void testCollectionConversion() {
|
||||
var users = List.of(
|
||||
new User("Camile", "Tough", false, "124sad"),
|
||||
new User("Marti", "Luther", true, "42309fd"),
|
||||
|
||||
Reference in New Issue
Block a user