refactor: flatten controller packages
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
package com.label.unit;
|
||||
|
||||
import com.label.module.annotation.controller.ExtractionController;
|
||||
import com.label.module.annotation.controller.QaController;
|
||||
import com.label.module.config.controller.SysConfigController;
|
||||
import com.label.module.export.controller.ExportController;
|
||||
import com.label.module.source.controller.SourceController;
|
||||
import com.label.controller.AuthController;
|
||||
import com.label.controller.ExportController;
|
||||
import com.label.controller.ExtractionController;
|
||||
import com.label.controller.QaController;
|
||||
import com.label.controller.SourceController;
|
||||
import com.label.controller.SysConfigController;
|
||||
import com.label.controller.TaskController;
|
||||
import com.label.controller.UserController;
|
||||
import com.label.controller.VideoController;
|
||||
import com.label.dto.SourceResponse;
|
||||
import com.label.module.task.controller.TaskController;
|
||||
import com.label.dto.TaskResponse;
|
||||
import com.label.module.user.controller.AuthController;
|
||||
import com.label.module.user.controller.UserController;
|
||||
import com.label.dto.LoginRequest;
|
||||
import com.label.dto.LoginResponse;
|
||||
import com.label.dto.UserInfoResponse;
|
||||
import com.label.module.video.controller.VideoController;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
|
||||
@@ -81,6 +81,23 @@ class PackageStructureMigrationTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("控制器类已迁移到扁平 controller 目录")
|
||||
void controllerTypesMoved() {
|
||||
for (String fqcn : java.util.List.of(
|
||||
"com.label.controller.AuthController",
|
||||
"com.label.controller.UserController",
|
||||
"com.label.controller.SourceController",
|
||||
"com.label.controller.TaskController",
|
||||
"com.label.controller.ExtractionController",
|
||||
"com.label.controller.QaController",
|
||||
"com.label.controller.ExportController",
|
||||
"com.label.controller.SysConfigController",
|
||||
"com.label.controller.VideoController")) {
|
||||
assertClassExists(fqcn);
|
||||
}
|
||||
}
|
||||
|
||||
private static void assertClassExists(String fqcn) {
|
||||
assertThatCode(() -> Class.forName(fqcn)).doesNotThrowAnyException();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user