UniversalSOATest | Line # 63 | 13 | 1 | 93.3% |
0.93333334
|
No Tests | |||
1 | /* | |
2 | * UniversalSOATest.java | |
3 | * | |
4 | * Created on 31 August 2006, 11:38 | |
5 | * | |
6 | * Copyright (c) 2006, University of Kent | |
7 | * All rights reserved. | |
8 | * | |
9 | * Redistribution and use in source and binary forms, with or without | |
10 | * modification, are permitted provided that the following conditions are met: | |
11 | * | |
12 | * Redistributions of source code must retain the above copyright notice, this | |
13 | * list of conditions and the following disclaimer. | |
14 | * | |
15 | * Redistributions in binary form must reproduce the above copyright notice, | |
16 | * this list of conditions and the following disclaimer in the documentation | |
17 | * and/or other materials provided with the distribution. | |
18 | * | |
19 | * 1. Neither the name of the University of Kent nor the names of its | |
20 | * contributors may be used to endorse or promote products derived from this | |
21 | * software without specific prior written permission. | |
22 | * | |
23 | * 2. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS | |
24 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, | |
25 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
26 | * PURPOSE ARE DISCLAIMED. | |
27 | * | |
28 | * 3. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | |
29 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
30 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
31 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
32 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
33 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
34 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
35 | * POSSIBILITY OF SUCH DAMAGE. | |
36 | * | |
37 | * 4. YOU AGREE THAT THE EXCLUSIONS IN PARAGRAPHS 2 AND 3 ABOVE ARE REASONABLE | |
38 | * IN THE CIRCUMSTANCES. IN PARTICULAR, YOU ACKNOWLEDGE (1) THAT THIS | |
39 | * SOFTWARE HAS BEEN MADE AVAILABLE TO YOU FREE OF CHARGE, (2) THAT THIS | |
40 | * SOFTWARE IS NOT "PRODUCT" QUALITY, BUT HAS BEEN PRODUCED BY A RESEARCH | |
41 | * GROUP WHO DESIRE TO MAKE THIS SOFTWARE FREELY AVAILABLE TO PEOPLE WHO WISH | |
42 | * TO USE IT, AND (3) THAT BECAUSE THIS SOFTWARE IS NOT OF "PRODUCT" QUALITY | |
43 | * IT IS INEVITABLE THAT THERE WILL BE BUGS AND ERRORS, AND POSSIBLY MORE | |
44 | * SERIOUS FAULTS, IN THIS SOFTWARE. | |
45 | * | |
46 | * 5. This license is governed, except to the extent that local laws | |
47 | * necessarily apply, by the laws of England and Wales. | |
48 | * | |
49 | * Author : Gansen Zhao | |
50 | * Email: gz7@kent.ac.uk | |
51 | * | |
52 | */ | |
53 | ||
54 | ||
55 | package issrg.test; | |
56 | ||
57 | import java.io.FileOutputStream; | |
58 | ||
59 | /** | |
60 | * This class is implemented as the entry point for the Universal SOA Testing | |
61 | * @author gansen | |
62 | */ | |
63 | public class UniversalSOATest { | |
64 | ||
65 | /** Creates a new instance of UniversalSOATest */ | |
66 | 0 | public UniversalSOATest() { |
67 | } | |
68 | ||
69 | 1 | public static void main(String[] args){ |
70 | 1 | System.setProperty("line.separator", "\r\n"); |
71 | ||
72 | 1 | SimpleTesting universalSOATesting = new SimpleTesting(); |
73 | ||
74 | 1 | FileOutputStream testOut; |
75 | ||
76 | 1 | String inputFileName=args[0]; |
77 | 1 | String outputFileName=args[1]; |
78 | ||
79 | // String inputFileName="G:\\Myrtlecvs\\buildfullpermis\\src\\issrg\\test\\universalsoa.in";//args[0]; | |
80 | // String outputFileName="G:\\Myrtlecvs\\buildfullpermis\\src\\issrg\\test\\universalsoa.out.test";//args[1]; | |
81 | ||
82 | //System.out.println("The input file is :--" + inputFileName); | |
83 | //System.out.println("The output file is :--" + outputFileName); | |
84 | ||
85 | // String outputFileName="G:\\Myrtlecvs\\issrgpermisfullsourcecode\\build\\src\\issrg\\test\\universalsoa.out"; | |
86 | // String inputFileName="G:\\Myrtlecvs\\issrgpermisfullsourcecode\\build\\src\\issrg\\test\\universalsoa.in"; | |
87 | ||
88 | 1 | String[] users={"CN=permisuser,O=PERMIS,C=GB","CN=kentstudent,O=KENT,C=GB","CN=joe,O=Canterbury,C=GB"}; |
89 | 1 | String[] roles={"student","user", "citizen","resident"}; |
90 | 1 | String[] issuers={"","CN=issr,O=KENT,C=GB","CN=CS,O=KENT,C=GB","CN=Canterbury-Council,O=Canterbury,C=GB"}; |
91 | 1 | String[] actions={"study","coding","vote"}; |
92 | 1 | String[] targets={"CN=source-code,O=PERMIS,C=GB","CN=accounting,O=KENT,C=GB","CN=tennis-count,O=Canterbury,C=GB"}; |
93 | ||
94 | // String[] users={"CN=permisuser,O=PERMIS,C=GB"}; | |
95 | // String[] roles={"user"}; | |
96 | // String[] issuers={"CN=issr,O=KENT,C=GB"}; | |
97 | // String[] actions={"coding"}; | |
98 | // String[] targets={"CN=Target0,O=PERMIS,C=GB"}; | |
99 | ||
100 | 1 | universalSOATesting.prepareTestCases(users,roles,issuers,actions,targets); |
101 | 1 | universalSOATesting.test(inputFileName,outputFileName); |
102 | ||
103 | 1 | return; |
104 | } | |
105 | ||
106 | } |
|