diff --git a/src/main/resources/mappers/LoginMapper.xml b/src/main/resources/mappers/LoginMapper.xml deleted file mode 100644 index 52628be..0000000 --- a/src/main/resources/mappers/LoginMapper.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/test/java/com/realtime/protection/server/defense/object/ProtectObjectServiceTest.java b/src/test/java/com/realtime/protection/server/defense/object/ProtectObjectServiceTest.java index 295b5ee..a537549 100644 --- a/src/test/java/com/realtime/protection/server/defense/object/ProtectObjectServiceTest.java +++ b/src/test/java/com/realtime/protection/server/defense/object/ProtectObjectServiceTest.java @@ -1,7 +1,6 @@ package com.realtime.protection.server.defense.object; import com.realtime.protection.configuration.entity.defense.object.ProtectObject; -import org.apache.ibatis.exceptions.PersistenceException; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -42,9 +41,7 @@ class ProtectObjectServiceTest { protectObject.setProtectObjectId(null); protectObject.setProtectObjectProtocol(null); - assertThrows(DataIntegrityViolationException.class, () -> { - assertTrue(protectObjectService.newProtectObject(protectObject) > 0); - }); + assertThrows(DataIntegrityViolationException.class, () -> assertTrue(protectObjectService.newProtectObject(protectObject) > 0)); } @Test @@ -111,8 +108,6 @@ class ProtectObjectServiceTest { } assertTrue((Boolean) protectObjectService.changeProtectObjectAuditStatus(testNum, 1).get("success")); int finalTestNum = testNum; - assertThrows(IllegalArgumentException.class, () -> { - protectObjectService.changeProtectObjectAuditStatus(finalTestNum, 2); - }); + assertThrows(IllegalArgumentException.class, () -> protectObjectService.changeProtectObjectAuditStatus(finalTestNum, 2)); } } \ No newline at end of file diff --git a/src/test/java/com/realtime/protection/server/rule/staticrule/StaticRuleServiceTest.java b/src/test/java/com/realtime/protection/server/rule/staticrule/StaticRuleServiceTest.java index 3b9ab36..d86b764 100644 --- a/src/test/java/com/realtime/protection/server/rule/staticrule/StaticRuleServiceTest.java +++ b/src/test/java/com/realtime/protection/server/rule/staticrule/StaticRuleServiceTest.java @@ -6,11 +6,11 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; +import java.time.LocalDateTime; import java.util.ArrayList; import java.util.List; -import java.time.LocalDateTime; -import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertTrue; @SpringBootTest public class StaticRuleServiceTest { diff --git a/src/test/java/com/realtime/protection/server/task/TaskServiceTest.java b/src/test/java/com/realtime/protection/server/task/TaskServiceTest.java index 460e8d1..38d0221 100644 --- a/src/test/java/com/realtime/protection/server/task/TaskServiceTest.java +++ b/src/test/java/com/realtime/protection/server/task/TaskServiceTest.java @@ -1,8 +1,7 @@ package com.realtime.protection.server.task; -import com.realtime.protection.configuration.entity.task.TaskCommandInfo; import com.realtime.protection.configuration.entity.task.Task; -import org.apache.ibatis.exceptions.PersistenceException; +import com.realtime.protection.configuration.entity.task.TaskCommandInfo; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; diff --git a/src/test/java/com/realtime/protection/server/task/status/CommandServiceTest.java b/src/test/java/com/realtime/protection/server/task/status/CommandServiceTest.java index fc69305..5da9529 100644 --- a/src/test/java/com/realtime/protection/server/task/status/CommandServiceTest.java +++ b/src/test/java/com/realtime/protection/server/task/status/CommandServiceTest.java @@ -1,8 +1,7 @@ package com.realtime.protection.server.task.status; -import com.realtime.protection.configuration.entity.task.TaskCommandInfo; -import com.realtime.protection.configuration.entity.task.Command; import com.realtime.protection.configuration.entity.task.FiveTupleWithMask; +import com.realtime.protection.configuration.entity.task.TaskCommandInfo; import com.realtime.protection.server.command.CommandService; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; @@ -14,7 +13,7 @@ import java.time.LocalDateTime; import java.util.ArrayList; import java.util.List; -import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; @SpringBootTest class CommandServiceTest { diff --git a/src/test/java/com/realtime/protection/server/whitelist/WhiteListServiceTest.java b/src/test/java/com/realtime/protection/server/whitelist/WhiteListServiceTest.java index f764f0c..7706370 100644 --- a/src/test/java/com/realtime/protection/server/whitelist/WhiteListServiceTest.java +++ b/src/test/java/com/realtime/protection/server/whitelist/WhiteListServiceTest.java @@ -1,6 +1,5 @@ package com.realtime.protection.server.whitelist; -import com.realtime.protection.configuration.entity.task.Command; import com.realtime.protection.configuration.entity.whitelist.WhiteListObject; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -10,7 +9,7 @@ import org.springframework.boot.test.context.SpringBootTest; import java.util.ArrayList; import java.util.List; -import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertTrue; @SpringBootTest class WhiteListServiceTest {