[BAEL-4381] Fix formatting
This commit is contained in:
parent
aac565de99
commit
f7915d9f62
@ -1,6 +1,3 @@
|
|||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
package com.baeldung.archunit.smurfs.persistence;
|
package com.baeldung.archunit.smurfs.persistence;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@ -13,10 +10,6 @@ import com.baeldung.archunit.smurfs.persistence.domain.Smurf;
|
|||||||
|
|
||||||
import static java.util.stream.Collectors.toList;
|
import static java.util.stream.Collectors.toList;
|
||||||
|
|
||||||
/**
|
|
||||||
* @author Philippe
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class SmurfsRepository {
|
public class SmurfsRepository {
|
||||||
|
|
||||||
private static Map<String,Smurf> smurfs = Collections.synchronizedMap(new TreeMap<>());
|
private static Map<String,Smurf> smurfs = Collections.synchronizedMap(new TreeMap<>());
|
||||||
|
@ -1,12 +1,5 @@
|
|||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
package com.baeldung.archunit.smurfs.persistence.domain;
|
package com.baeldung.archunit.smurfs.persistence.domain;
|
||||||
|
|
||||||
/**
|
|
||||||
* @author Philippe
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class Smurf {
|
public class Smurf {
|
||||||
private String name;
|
private String name;
|
||||||
private boolean comic;
|
private boolean comic;
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
package com.baeldung.archunit.smurfs.service;
|
package com.baeldung.archunit.smurfs.service;
|
||||||
|
|
||||||
import java.util.List;
|
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.persistence.domain.Smurf;
|
||||||
import com.baeldung.archunit.smurfs.service.dto.SmurfDTO;
|
import com.baeldung.archunit.smurfs.service.dto.SmurfDTO;
|
||||||
|
|
||||||
/**
|
|
||||||
* @author Philippe
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Component
|
@Component
|
||||||
public class SmurfsService {
|
public class SmurfsService {
|
||||||
|
|
||||||
|
@ -1,14 +1,6 @@
|
|||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
package com.baeldung.archunit.smurfs.service.dto;
|
package com.baeldung.archunit.smurfs.service.dto;
|
||||||
|
|
||||||
import com.baeldung.archunit.smurfs.persistence.domain.Smurf;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author Philippe
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class SmurfDTO {
|
public class SmurfDTO {
|
||||||
private String name;
|
private String name;
|
||||||
private boolean comic;
|
private boolean comic;
|
||||||
|
@ -17,10 +17,6 @@ import static org.junit.jupiter.api.Assertions.assertThrows;
|
|||||||
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
/**
|
|
||||||
* @author Philippe
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class SmurfsArchUnitTest {
|
public class SmurfsArchUnitTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -29,10 +25,9 @@ public class SmurfsArchUnitTest {
|
|||||||
|
|
||||||
ArchRule r1 = classes()
|
ArchRule r1 = classes()
|
||||||
.that()
|
.that()
|
||||||
.resideInAPackage("..presentation..")
|
.resideInAPackage("..presentation..")
|
||||||
.should()
|
.should().onlyDependOnClassesThat()
|
||||||
.onlyDependOnClassesThat()
|
.resideInAPackage("..service..");
|
||||||
.resideInAPackage("..service..");
|
|
||||||
|
|
||||||
assertThrows(AssertionError.class, ()-> r1.check(jc)) ;
|
assertThrows(AssertionError.class, ()-> r1.check(jc)) ;
|
||||||
}
|
}
|
||||||
@ -44,10 +39,9 @@ public class SmurfsArchUnitTest {
|
|||||||
|
|
||||||
ArchRule r1 = classes()
|
ArchRule r1 = classes()
|
||||||
.that()
|
.that()
|
||||||
.resideInAPackage("..presentation..")
|
.resideInAPackage("..presentation..")
|
||||||
.should()
|
.should().onlyDependOnClassesThat()
|
||||||
.onlyDependOnClassesThat()
|
.resideInAnyPackage("..service..", "java..", "javax..", "org.springframework..");
|
||||||
.resideInAnyPackage("..service..", "java..", "javax..", "org.springframework..");
|
|
||||||
|
|
||||||
r1.check(jc);
|
r1.check(jc);
|
||||||
}
|
}
|
||||||
@ -58,10 +52,9 @@ public class SmurfsArchUnitTest {
|
|||||||
|
|
||||||
ArchRule r1 = noClasses()
|
ArchRule r1 = noClasses()
|
||||||
.that()
|
.that()
|
||||||
.resideInAPackage("..presentation..")
|
.resideInAPackage("..presentation..")
|
||||||
.should()
|
.should().dependOnClassesThat()
|
||||||
.dependOnClassesThat()
|
.resideInAPackage("..persistence..");
|
||||||
.resideInAPackage("..persistence..");
|
|
||||||
|
|
||||||
r1.check(jc);
|
r1.check(jc);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user