ludc
2025-01-16 986aa62ed00bee39363bab41b4eeb8259d446efd
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
package com.vci.client.portal.test;
 
import org.junit.Test;
 
import com.vci.client.portal.utility.UITools;
import com.vci.corba.common.VCIError;
import com.vci.corba.portal.data.Constraint;
import com.vci.corba.portal.data.PLAction;
 
 
public class TestPLAction {
    //test保存PLAction
//    @org.junit.Test
//    public void testSavePLAction(){
//        PLAction plAction = new PLAction();
//        plAction.plOId = ObjectUtility.getNewObjectID36();
//        plAction.plCode = "plCode1";
//        plAction.plName = "plName1";
//        plAction.plBSUrl = "plBSUrl1";
//        plAction.plCSClass = "plCSClass1";
//        plAction.plDesc = "plDesc1";
//        plAction.plCreateUser = "sam";
//        plAction.plModifyUser = "sam";
//        plAction.plTypeType = "business1";
//        plAction.plLicensOrs = "plLicensOrs1";
//        try {
//            boolean flag = Tool.getService().savePLAction(plAction);
//            Assert.assertTrue(flag);
//        } catch (PLMError e) {
//            e.printStackTrace();
//        }
//    }
    
    // test更新PLAction
//    @org.junit.Test
//    public void testUpdatePLAction() {
//        PLAction plAction = new PLAction();
//        plAction.plOId = "237F4354-7A92-478D-C57D-3A80448E35FC";
//        plAction.plCode = "plCode222";
//        plAction.plName = "plName22";
//        plAction.plBSUrl = "plBSUrl1";
//        plAction.plCSClass = "plCSClass1";
//        plAction.plDesc = "plDesc1";
//        plAction.plCreateUser = "sam";
//        plAction.plModifyUser = "sam";
//        plAction.plTypeType = "business1";
//        plAction.plLicensOrs = "plLicensOrs1";
//        try {
//            boolean flag = Tool.getService().updatePLAction(plAction);
//            Assert.assertTrue(flag);
//        } catch (PLMError e) {
//            e.printStackTrace();
//        }
//    }
    
    // test删除PLAction
//    @org.junit.Test
//    public void testDeletePLAction() {
//        PLAction plAction = new PLAction();
//        plAction.plOId = "237F4354-7A92-478D-C57D-3A80448E35FC";
//        plAction.plCode = "plCode222";
//        plAction.plName = "plName22";
//        plAction.plBSUrl = "plBSUrl1";
//        plAction.plCSClass = "plCSClass1";
//        plAction.plDesc = "plDesc1";
//        plAction.plCreateUser = "sam";
//        plAction.plModifyUser = "sam";
//        plAction.plTypeType = "business1";
//        plAction.plLicensOrs = "plLicensOrs1";
//        try {
//            boolean flag = Tool.getService().deletePLAction(plAction);
//            Assert.assertTrue(flag);
//        } catch (PLMError e) {
//            e.printStackTrace();
//        }
//    }
    
    // test删除PLAction
//    @org.junit.Test
//    public void testDeletePLActionById() {
//        try {
//            boolean flag = Tool.getService().deletePLActionByID("842BFCA9-E0DB-54F1-86F0-4E39EB0135F8");
//            Assert.assertTrue(flag);
//        } catch (PLMError e) {
//            e.printStackTrace();
//        }
//    }
    
    
//    @Test
//    public void testGetPLActionById() throws PLMError{
//        PLAction obj = Tool.getService().getPLActionById("21FFD30A-EF7F-17ED-9B5E-FBC78979481D");
//        System.out.println();
//    }
//    
//    @Test
//    public void testGetAllPLAction() throws PLMError{
//        PLAction[] obj = Tool.getService().getAllPLAction();
//        System.out.println();
//    }
    
    @Test
    public void testGetPLActionsByConsArray() throws VCIError{
        Constraint[] consArray = new Constraint[2];
        Constraint cons1 = new Constraint();
        cons1.key = "PLOID";
        cons1.value = "oid";
        Constraint cons2 = new Constraint();
        cons2.key = "PLCODE";
        cons2.value = "c";
        consArray[0] = cons1;
        consArray[1] = cons2;
        PLAction[] obj = UITools.getService().getPLActionsByConsArray(consArray);
        System.out.println();
    }
}