package cn.axzo.msg.center.message.service.todo.manage;

import cn.axzo.msg.center.MsgCenterApplication;
import cn.axzo.msg.center.service.pending.request.CompletePendingMessageByIdRequest;
import cn.axzo.msg.center.service.pending.request.TodoHandoverRequest;
import lombok.RequiredArgsConstructor;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.annotation.Commit;
import org.springframework.transaction.annotation.Transactional;

import java.util.Arrays;

/**
 * @author yanglin
 */
@SpringBootTest(classes = MsgCenterApplication.class)
@RequiredArgsConstructor(onConstructor_ = @Autowired)
class TodoManagerTest {

    private final TodoManager todoManager;

    @Test @Transactional @Commit
    void foo() {
        CompletePendingMessageByIdRequest request = new CompletePendingMessageByIdRequest();
        request.setIds(Arrays.asList(825648L, 825647L, 825646L, 825645L, 825644L, 825643L, 825642L, 825641L, 825640L, 825639L));
        boolean b = todoManager.completeById(request);
        System.out.println();
    }

}