package com.realtime.protection.server.alertmessage; import com.realtime.protection.configuration.entity.alert.AlertMessage; import com.realtime.protection.configuration.entity.defense.object.ProtectObject; import com.realtime.protection.configuration.entity.defense.template.Template; import com.realtime.protection.configuration.entity.rule.dynamicrule.DynamicRuleObject; import com.realtime.protection.configuration.entity.task.FiveTupleWithMask; import com.realtime.protection.configuration.entity.task.Task; import com.realtime.protection.server.defense.object.ProtectObjectService; import com.realtime.protection.server.defense.template.TemplateService; import com.realtime.protection.server.rule.dynamicrule.DynamicRuleService; import com.realtime.protection.server.task.TaskService; 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.List; @SpringBootTest public class AlertMessageTest { private final AlertMessageService alertMessageService; private final ProtectObjectService protectObjectService; private final TemplateService templateService; private final DynamicRuleService dynamicRuleService; private final TaskService taskService; @Autowired public AlertMessageTest(AlertMessageService alertMessageService ,ProtectObjectService protectObjectService,TemplateService templateService, DynamicRuleService dynamicRuleService,TaskService taskService) { this.alertMessageService = alertMessageService; this.protectObjectService = protectObjectService; this.templateService = templateService; this.dynamicRuleService = dynamicRuleService; this.taskService = taskService; } @Test void testReceiveAlertMessage() { List protectObject = protectObjectService.queryProtectObjects( null, null, null, null, null, null, null, null, null, null, 1, 1); List