EMMA Coverage Report (generated Fri Sep 15 10:32:43 EDT 2006)
[all classes][edu.iu.uis.sit.portal.portlet.security.expression]

COVERAGE SUMMARY FOR SOURCE FILE [ExpressionMain.java]

nameclass, %method, %block, %line, %
ExpressionMain.java0%   (0/1)0%   (0/2)0%   (0/97)0%   (0/23)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ExpressionMain0%   (0/1)0%   (0/2)0%   (0/97)0%   (0/23)
ExpressionMain (): void 0%   (0/1)0%   (0/3)0%   (0/1)
main (String []): void 0%   (0/1)0%   (0/94)0%   (0/22)

1package edu.iu.uis.sit.portal.portlet.security.expression;
2 
3import com.thoughtworks.xstream.XStream;
4 
5public class ExpressionMain {
6    public static void main(String[] args) {
7        OrExpression accessControl = new OrExpression();
8        AndExpression and1 = new AndExpression();
9        and1.addChild(new EdsExpression("iu.user.affiliation", "student"));
10        OrExpression or1 = new OrExpression();
11        or1.addChild(new EdsExpression("user.department", "csci"));
12        or1.addChild(new EdsExpression("user.department", "informatics"));
13        and1.addChild(or1);
14        EdsExpression acl2 = new EdsExpression("user.name.given", "Smith");
15        NotExpression not1 = new NotExpression(acl2);
16        and1.addChild(not1);
17        accessControl.addChild(and1);
18        AdsExpression acl1 = new AdsExpression("name", "bl-uits-onestart-admin"); 
19        accessControl.addChild(acl1);
20 
21        XStream xstream = new XStream();
22        xstream.alias("or", OrExpression.class);
23        xstream.alias("and", AndExpression.class);
24        xstream.alias("not", NotExpression.class);
25        xstream.alias("ads", AdsExpression.class);
26        xstream.alias("eds", EdsExpression.class);
27        
28        String xml = xstream.toXML(accessControl);
29        System.out.println(xml);        
30    }
31}

[all classes][edu.iu.uis.sit.portal.portlet.security.expression]
EMMA 2.0.5312 (C) Vladimir Roubtsov