MyBatisPlusIServiceTest.kt 745 字节
Newer Older
2
2293736867 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
package com.example.demo

import com.example.demo.entity.User
import com.example.demo.service.MyBatisPlusIService
import org.junit.jupiter.api.Test
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.context.SpringBootTest

@SpringBootTest
class MyBatisPlusIServiceTest
{
    @Autowired
    lateinit var myBatisPlusIService: MyBatisPlusIService
    @Test
    fun save()
    {
        myBatisPlusIService.save(User("1","2","3"))
    }

    @Test
    fun delete()
    {
        myBatisPlusIService.delete("3")
    }

    @Test
    fun select()
    {
        println(myBatisPlusIService.select("1"))
    }

    @Test
    fun selectAll()
    {
        println(myBatisPlusIService.selectAll())
    }
}