-
Notifications
You must be signed in to change notification settings - Fork 4
/
CredentialControllerTest.sol
82 lines (71 loc) · 1.59 KB
/
CredentialControllerTest.sol
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
pragma solidity ^0.4.4;
import "./CredentialController.sol";
contract CredentialControllerTest{
CredentialController private credentialController;
function CredentialControllerTest
(
address credentialControllerAddress
)
public
{
credentialController=CredentialController(credentialControllerAddress);
}
/*
函数用途:测试设置某类型cpt的可发行的限量数额功能
参数:
cptid:要使用的 cpt 的编号
limitNum:该类型 cpt 限量发行的额数
返回值:无
*/
function setLimitTest
(
uint cptid,
uint limitNum
)
public
{
credentialController.setLimit(cptid,limitNum);
}
/*
函数用途:测试生成credentialID号与随机数共
参数:
cptid:要获取的 cpt 的编号
返回值:无
*/
function generateIdAndRandNumTest
(
uint cptid
)
public
{
credentialController.generateIdAndRandNum(cptid);
}
/*
函数用途:测试获取某crendential生成的随机数功能
参数:
creid:要使用的credential的ID号
返回值:无
*/
function getRandNumOfCreidTest
(
uint creid
)
public
{
credentialController.getRandNumOfCreid(creid);
}
/*
函数用途:测试获取某类型cpt的可发行的限量数额与已发行credential数量功能
参数:
cptid:要获取的 cpt 的编号
返回值:无
*/
function getCptILimitAndIssuedNumTest
(
uint cptid
)
public
{
credentialController.getCptILimitAndIssuedNum(cptid);
}
}