feiyu02
2024-08-15 196bb14112448857a885e32dc4149e308e00b01a
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
package cn.flightfeather.supervision.common.autoledger
 
import cn.flightfeather.supervision.domain.mapper.UserinfoMapper
import cn.flightfeather.supervision.domain.repository.PracticalOperationRep
import cn.flightfeather.supervision.domain.repository.UserInfoRep
import org.junit.Test
import org.junit.jupiter.api.Assertions.*
import org.junit.jupiter.api.extension.ExtendWith
import org.junit.runner.RunWith
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.test.context.junit.jupiter.SpringExtension
import org.springframework.test.context.junit4.SpringRunner
 
@RunWith(SpringRunner::class)
@ExtendWith(SpringExtension::class)
@SpringBootTest
class AutoLedgerTest {
 
    @Autowired
    lateinit var autoLedger: AutoLedger
 
    @Autowired
    lateinit var userInfoRep: UserInfoRep
 
    @Autowired
    lateinit var practicalOperationRep: PracticalOperationRep
 
    @Test
    fun create() {
        val userInfo = userInfoRep.getUser("keKTLrmQCr1RLZWg")
        val operations = practicalOperationRep.getOperation(listOf(18))
        autoLedger.create(userInfo, operations, 2024, 3)
    }
}