[BAEL-4381] Fix formatting

This commit is contained in:
Philippe 2020-08-14 09:29:27 -03:00
parent aac565de99
commit f7915d9f62
5 changed files with 11 additions and 46 deletions

View File

@ -1,6 +1,3 @@
/**
*
*/
package com.baeldung.archunit.smurfs.persistence;
import java.util.Collections;
@ -13,10 +10,6 @@ import com.baeldung.archunit.smurfs.persistence.domain.Smurf;
import static java.util.stream.Collectors.toList;
/**
* @author Philippe
*
*/
public class SmurfsRepository {
private static Map<String,Smurf> smurfs = Collections.synchronizedMap(new TreeMap<>());

View File

@ -1,12 +1,5 @@
/**
*
*/
package com.baeldung.archunit.smurfs.persistence.domain;
/**
* @author Philippe
*
*/
public class Smurf {
private String name;
private boolean comic;

View File

@ -1,6 +1,4 @@
/**
*
*/
package com.baeldung.archunit.smurfs.service;
import java.util.List;
@ -12,10 +10,6 @@ import com.baeldung.archunit.smurfs.persistence.SmurfsRepository;
import com.baeldung.archunit.smurfs.persistence.domain.Smurf;
import com.baeldung.archunit.smurfs.service.dto.SmurfDTO;
/**
* @author Philippe
*
*/
@Component
public class SmurfsService {

View File

@ -1,14 +1,6 @@
/**
*
*/
package com.baeldung.archunit.smurfs.service.dto;
import com.baeldung.archunit.smurfs.persistence.domain.Smurf;
/**
* @author Philippe
*
*/
public class SmurfDTO {
private String name;
private boolean comic;

View File

@ -17,10 +17,6 @@ import static org.junit.jupiter.api.Assertions.assertThrows;
import org.junit.jupiter.api.Test;
/**
* @author Philippe
*
*/
public class SmurfsArchUnitTest {
@Test
@ -29,10 +25,9 @@ public class SmurfsArchUnitTest {
ArchRule r1 = classes()
.that()
.resideInAPackage("..presentation..")
.should()
.onlyDependOnClassesThat()
.resideInAPackage("..service..");
.resideInAPackage("..presentation..")
.should().onlyDependOnClassesThat()
.resideInAPackage("..service..");
assertThrows(AssertionError.class, ()-> r1.check(jc)) ;
}
@ -44,10 +39,9 @@ public class SmurfsArchUnitTest {
ArchRule r1 = classes()
.that()
.resideInAPackage("..presentation..")
.should()
.onlyDependOnClassesThat()
.resideInAnyPackage("..service..", "java..", "javax..", "org.springframework..");
.resideInAPackage("..presentation..")
.should().onlyDependOnClassesThat()
.resideInAnyPackage("..service..", "java..", "javax..", "org.springframework..");
r1.check(jc);
}
@ -58,10 +52,9 @@ public class SmurfsArchUnitTest {
ArchRule r1 = noClasses()
.that()
.resideInAPackage("..presentation..")
.should()
.dependOnClassesThat()
.resideInAPackage("..persistence..");
.resideInAPackage("..presentation..")
.should().dependOnClassesThat()
.resideInAPackage("..persistence..");
r1.check(jc);
}