build: add standard WCS core module

This commit is contained in:
zgw
2026-08-10 15:00:23 +08:00
parent 352c17eb9f
commit 77067e07b3
5 changed files with 94 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
package com.ruoyi.wcs;
/**
* Stable marker for the standard WCS core module.
*/
public final class WcsModule {
private WcsModule() {
}
}

View File

@@ -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"));
}
}