package com.liquidnet.service.example.service.impl;
import com.liquidnet.service.example.service.IUserService;
import com.liquidnet.service.example.entity.User;
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.SpringJUnit4ClassRunner;

import java.time.LocalDateTime;

/**
 * @author Li Chen
 * @date 2020/9/9 10:21 上午
 * @since jdk1.8
 */
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest
public class UserServiceImplTest {
    @Autowired
    private IUserService userService;

    @Test
    public void insert() {
        User user = new User();
        user.setId(LocalDateTime.now().toString());
        user.setName("lichen");
        user.setAge(0);
        userService.insert(user);

    }

}