Clover Coverage Report
Coverage timestamp: Sun Mar 23 2008 08:24:39 GMT
13   99   1   4.33
0   23   0.23   3
3     1  
1    
 
 
  OligationTesting       Line # 63 13 1 87.5% 0.875
 
No Tests
 
1    /*
2    * OligationTesting.java
3    *
4    * Created on 2006-9-29-, 1:23pm
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 designed to test the obligtion features in PERMIS.
61    * @author gansen
62    */
 
63    public class OligationTesting extends SimpleTesting{
64   
65    /** Creates a new instance of OligationTesting */
 
66  0 toggle public OligationTesting() {
67    }
68   
 
69  0 toggle public void prepareTestCases(String[] users, String[] roles, String[] issuers, String[] actions, String[] targets) {
70    }
71   
 
72  1 toggle public static void main(String[] args){
73  1 System.setProperty("line.separator", "\r\n");
74   
75  1 SimpleTesting universalSOATesting = new SimpleTesting();
76   
77  1 FileOutputStream testOut;
78   
79  1 String inputFileName=args[0];
80  1 String outputFileName=args[1];
81   
82    //String inputFileName="G:\\Myrtlecvs\\PERMIS\\src\\issrg\\test\\obligationtest.in";//args[0];
83    //String outputFileName="G:\\Myrtlecvs\\PERMIS\\src\\issrg\\test\\obligationtest.out.test";//args[1];
84   
85   
86  1 String[] users={"CN=developer1,O=PERMIS,C=GB","CN=user1,O=PERMISUSERS,C=GB","CN=joe,O=UKC,C=GB"};
87  1 String[] roles={"Developer","User", "Student"};
88  1 String[] issuers={"CN=cs,O=UKC,C=GB","CN=ISSRProjectManager,o=UKC,C=GB","CN=ISSRSaleManager,o=UKC,C=GB"};
89  1 String[] actions={"study","Modify","Use"};
90  1 String[] targets={"cn=simplepermis,o=PERMISSourcecode,C=GB","CN=tennis-count,O=Canterbury,C=GB"};
91   
92   
93   
94  1 universalSOATesting.prepareTestCases(users,roles,issuers,actions,targets);
95  1 universalSOATesting.test(inputFileName,outputFileName);
96   
97  1 return;
98    }
99    }