Helius
2021-03-18 605ad677377b5aa3e163890ef3ca43df49f57e67
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.matrix;
 
import com.matrix.system.common.bean.SysUsers;
import com.matrix.system.hive.bean.SysShopInfo;
import com.matrix.system.dataMove.DateMoveServiceImpl;
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;
 
import java.io.UnsupportedEncodingException;
import java.security.NoSuchAlgorithmException;
import java.util.List;
 
/**
 * @author wzy
 * @date 2021-03-18
 **/
@RunWith(SpringRunner.class)
@SpringBootTest(classes = {ZqErpApplication.class},webEnvironment =SpringBootTest.WebEnvironment.RANDOM_PORT)
public class DataMoveTest {
 
    @Autowired
    private DateMoveServiceImpl dataMove;
 
    @Test
    public void slaveTest() {
        List<SysShopInfo> shopInfos = dataMove.oldShopInfo();
        dataMove.toNewShopInfo(shopInfos);
    }
 
    @Test
    public void sysUsersMoveTest() throws UnsupportedEncodingException, NoSuchAlgorithmException {
        List<SysUsers> sysUsers = dataMove.oldSysUsers();
        dataMove.newSysUsers(sysUsers);
    }
}