package com.izouma.dingdong.contorller;

import com.izouma.dingdong.domain.user.Address;
import com.izouma.dingdong.web.user.AddressController;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

@RunWith(SpringRunner.class)
@SpringBootTest
public class AddressControllerTest {
    @Autowired
    private AddressController addressController;

    @Test
    public void test(){
        Address address = Address.builder()
                .addressName("江苏省南京市建邺区嘉陵江东街与广聚路交汇处南京国家广告产业园")
                .enabled(true)
                .userId(188L)
                .phone("1231")
                .name("阿不")
                .latitude(31.98161100)
                .longitude(118.73562700)
                .isDefault(false)
                .build();
        addressController.save(address);
    }

}
