package com.nokia.alarm.mapper;

import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import com.nokia.alarm.entity.ResultMap;

@SpringBootTest
public class ResultMapDaoTest {

    @Autowired
    private ResultMapDao resultMapDao;

    @Test
    void testUpdateData() {
        ResultMap result = new ResultMap();
        result.setUniqueId("aaa");
        result.setCancelTime("2022-6-27 11:00:00");
        resultMapDao.updateData(result);
        System.out.println("done!");
    }

    @Test
    void testInsertdata() {
        ResultMap result = new ResultMap();
        result.setUniqueId("aaa");
        result.setEventTime("2022-06-27 15:57:05");
        resultMapDao.insertData(result);
        System.out.println("done!");
    }

    @Test
    void findByUniqueId() {
        ResultMap result = new ResultMap();
        result.setUniqueId("24604231315990233716931359656937819837");
        result.setEventTime("2022-06-27 19:24:58");
        int findByUniqueId = resultMapDao.findByUniqueId(result);
        System.out.println(findByUniqueId);
    }
}
