Browse Source

更新测试

tags/v2.5.2
xiaoying 1 year ago
parent
commit
47b885b614
1 changed files with 23 additions and 0 deletions
  1. +23
    -0
      tuoheng_oidc_admin/src/test/java/com/tuoheng/passwordTest.java

+ 23
- 0
tuoheng_oidc_admin/src/test/java/com/tuoheng/passwordTest.java View File

@@ -1,5 +1,7 @@
package com.tuoheng;

import com.tuoheng.model.param.ClientRoleDto;
import com.tuoheng.third.service.impl.ThirdServiceImpl;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
@@ -7,6 +9,9 @@ import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.ArrayList;
import java.util.List;

/**
* @Author xiaoying
* @Date 2023/2/21 11:12
@@ -17,6 +22,8 @@ public class passwordTest {

@Autowired
PasswordEncoder passwordEncoder;
@Autowired
ThirdServiceImpl thirdService;
/*
明文,加密成密文
*/
@@ -36,4 +43,20 @@ public class passwordTest {
boolean matches = passwordEncoder.matches(password, encode);
System.out.println(matches);
}

@Test
public void getModelList() {

List<ClientRoleDto> list =new ArrayList<>();

ClientRoleDto clientRoleDto = new ClientRoleDto();
clientRoleDto.setServiceId("85b0fe8a352c4dbda6191a382362a81a");
ClientRoleDto clientRoleDto2 = new ClientRoleDto();
clientRoleDto.setServiceId("e5137ec466db426c96a8b194a6853b77");
list.add(clientRoleDto);
list.add(clientRoleDto2);

List<ClientRoleDto> modelList = thirdService.getModelList(list);
System.out.println("modelList = " + modelList);
}
}

Loading…
Cancel
Save