package com.unis.service;

import com.unis.Application;
import com.unis.basic.info.modular.pricemonitor.entity.PriceMonitor;
import com.unis.basic.info.modular.pricemonitor.service.PriceMonitorService;
import com.unis.common.geo.GeoPoint;
import org.junit.jupiter.api.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import javax.annotation.Resource;


@RunWith(SpringRunner.class)
@SpringBootTest(classes = Application.class)
class PriceMonitorServiceTest {

    @Resource
    private PriceMonitorService priceMonitorService;


    @Test
    void add() {
        PriceMonitor priceMonitor=new PriceMonitor();
        priceMonitor.setName("测试点");
        priceMonitor.setAddress("测试地址");
        priceMonitor.setSysOrgId("1");
        priceMonitor.setGeoPoint(new GeoPoint(-74.006, 40.7128));
        priceMonitorService.save(priceMonitor);

    }
}