Changeset 686 for raptor-client


Ignore:
Timestamp:
04/13/11 23:39:36 (9 years ago)
Author:
philsmart
Message:
 
Location:
raptor-client/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • raptor-client/trunk/pom.xml

    r678 r686  
    3838            <version>3.0-SNAPSHOT</version> 
    3939        </dependency> 
     40         
     41        <dependency> 
     42            <groupId>net.shibboleth.idp</groupId> 
     43            <artifactId>idp-attribute-resolver-impl</artifactId> 
     44            <version>3.0-SNAPSHOT</version> 
     45        </dependency> 
    4046 
    4147 
    4248        <!-- DONE --> 
    4349 
    44  
    45         <dependency> 
    46             <groupId>org.slf4j</groupId> 
    47             <artifactId>slf4j-api</artifactId> 
    48             <version>1.6.1</version> 
    49             <scope>provided</scope> 
    50         </dependency> 
    5150 
    5251        <!-- Deep clone library --> 
  • raptor-client/trunk/src/test/java/uk/ac/cardiff/raptor/event/expansion/AttributeAssociationTest.java

    r678 r686  
    77 
    88 
     9import java.util.HashMap; 
     10import java.util.Map; 
     11 
     12import net.shibboleth.idp.attribute.Attribute; 
     13import net.shibboleth.idp.attribute.resolver.AttributeResolutionException; 
     14import net.shibboleth.idp.attribute.resolver.AttributeResolver; 
     15import net.shibboleth.idp.attribute.resolver.BaseDataConnector; 
     16import net.shibboleth.idp.attribute.resolver.MockDataConnector; 
     17import net.shibboleth.idp.attribute.resolver.ResolvedDataConnector; 
     18 
    919import org.junit.Assert; 
     20import org.opensaml.util.collections.LazySet; 
    1021 
    1122/** 
     
    1930    public void testSetAttributeDefinitions() { 
    2031        System.out.println("Do Test"); 
    21 //        AttributeResolver resolver = new AttributeResolver("foo"); 
    22 // 
    23 //        LazySet<BaseAttributeDefinition> definitions = null; 
    24 //        resolver.setAttributeDefinition(definitions); 
    25 //        Assert.assertNotNull(resolver.getAttributeDefinitions()); 
    26 //        Assert.assertTrue(resolver.getAttributeDefinitions().isEmpty()); 
    27 // 
    28 //        definitions = new LazySet<BaseAttributeDefinition>(); 
    29 //        resolver.setAttributeDefinition(definitions); 
    30 //        Assert.assertNotNull(resolver.getAttributeDefinitions()); 
    31 //        Assert.assertTrue(resolver.getAttributeDefinitions().isEmpty()); 
    32 // 
    33 //        definitions.add(new MockAttributeDefinition("foo", new Attribute<String>("test"))); 
    34 //        definitions.add(null); 
    35 //        definitions.add(new MockAttributeDefinition("bar", new Attribute<String>("test"))); 
    36 //        definitions.add(new MockAttributeDefinition("foo", new Attribute<String>("test"))); 
    37 //        resolver.setAttributeDefinition(definitions); 
    38 //        Assert.assertNotNull(resolver.getAttributeDefinitions()); 
    39 //        Assert.assertEquals(resolver.getAttributeDefinitions().size(), 2); 
    40 // 
    41 //        definitions.clear(); 
    42 //        Assert.assertNotNull(resolver.getAttributeDefinitions()); 
    43 //        Assert.assertEquals(resolver.getAttributeDefinitions().size(), 2); 
    44 // 
    45 //        resolver.setAttributeDefinition(definitions); 
    46 //        Assert.assertNotNull(resolver.getAttributeDefinitions()); 
    47 //        Assert.assertTrue(resolver.getAttributeDefinitions().isEmpty()); 
     32        AttributeResolver resolver = new AttributeResolver("foo"); 
     33 
     34        LazySet<BaseDataConnector> connectors = null; 
     35        resolver.setDataConnectors(connectors); 
     36        Assert.assertNotNull(resolver.getDataConnectors()); 
     37        Assert.assertTrue(resolver.getDataConnectors().isEmpty()); 
     38 
     39        connectors = new LazySet<BaseDataConnector>(); 
     40        resolver.setDataConnectors(connectors); 
     41        Assert.assertNotNull(resolver.getDataConnectors()); 
     42        Assert.assertTrue(resolver.getDataConnectors().isEmpty()); 
     43 
     44        connectors.add(new MockDataConnector("foo", (Map)null)); 
     45        connectors.add(null); 
     46        connectors.add(new MockDataConnector("bar", (Map)null)); 
     47        connectors.add(new MockDataConnector("foo", (Map)null)); 
     48        resolver.setDataConnectors(connectors); 
     49        Assert.assertNotNull(resolver.getDataConnectors()); 
     50        Assert.assertEquals(resolver.getDataConnectors().size(), 2); 
     51 
     52        connectors.clear(); 
     53        Assert.assertNotNull(resolver.getDataConnectors()); 
     54        Assert.assertEquals(resolver.getDataConnectors().size(), 2); 
     55 
     56        resolver.setDataConnectors(connectors); 
     57        Assert.assertNotNull(resolver.getDataConnectors()); 
     58        Assert.assertTrue(resolver.getDataConnectors().isEmpty()); 
    4859    } 
    4960 
Note: See TracChangeset for help on using the changeset viewer.