package com.nokia.alarm.service;

import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

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

@SpringBootTest
public class AlarmSaveToFileServiceTest {

    @Autowired
    private AlarmSaveToFileService service;

    @Test
    void testGetHttpSave() throws ParseException {
        DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.sss");
        Date date = format.parse("2022-08-08 05:35:00.000");
        service.getHttpSave(date);
    }

    @Test
    void testGetHttpUpdate() throws ParseException {
        DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.sss");
        Date date = format.parse("2022-06-28 16:55:00.000");
        service.getHttpUpdate(date);
    }
}
