build: add standard WCS core module
This commit is contained in:
9
ruoyi-wcs/src/main/java/com/ruoyi/wcs/WcsModule.java
Normal file
9
ruoyi-wcs/src/main/java/com/ruoyi/wcs/WcsModule.java
Normal file
@@ -0,0 +1,9 @@
|
||||
package com.ruoyi.wcs;
|
||||
|
||||
/**
|
||||
* Stable marker for the standard WCS core module.
|
||||
*/
|
||||
public final class WcsModule {
|
||||
private WcsModule() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.ruoyi.wcs.architecture;
|
||||
|
||||
import com.tngtech.archunit.core.importer.ClassFileImporter;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static com.tngtech.archunit.lang.syntax.ArchRuleDefinition.noClasses;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
class WcsModuleArchitectureTest {
|
||||
|
||||
@Test
|
||||
void exposesAStableModuleMarker() throws Exception {
|
||||
assertEquals("com.ruoyi.wcs.WcsModule",
|
||||
Class.forName("com.ruoyi.wcs.WcsModule").getName());
|
||||
}
|
||||
|
||||
@Test
|
||||
void coreDoesNotDependOnProjectOrPlcPackages() {
|
||||
noClasses().that().resideInAPackage("com.ruoyi.wcs..")
|
||||
.should().dependOnClassesThat()
|
||||
.resideInAnyPackage("com.ruoyi.schedule..", "com.ruoyi.api..",
|
||||
"HslCommunication..", "org.apache.plc4x..")
|
||||
.check(new ClassFileImporter().importPackages("com.ruoyi.wcs"));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user