edu.internet2.middleware.shibboleth.common.attribute.filtering.provider.match
Class BaseTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by edu.internet2.middleware.shibboleth.common.attribute.filtering.provider.match.BaseTestCase
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
AndMatchFunctorTest, AnyMatchFunctorTest, AttributeScopeRegexMatchFunctorTest, AttributeScopeStringMatchFunctorTest, AttributeValueRegexMatchFunctorTest, AttributeValueStringMatchFunctorTest, AuthenticationMethodRegexMatchFunctorTest, AuthenticationMethodStringMatchFunctorTest, NotMatchFunctorTest, NumAttributeValuesMatchFunctorTest, OrMatchFunctorTest, PrincipalRegexMatchFunctorTest, PrincipalStringMatchFunctorTest, ScriptMatchFunctorTest

public class BaseTestCase
extends junit.framework.TestCase

Base class for JUnit test cases.


Field Summary
static String DATA_PATH
          Base path for data files.
protected  edu.internet2.middleware.shibboleth.common.attribute.filtering.provider.ShibbolethFilteringContext filterContext
          Simple filtering context for use by tests.
protected  edu.internet2.middleware.shibboleth.common.attribute.BaseAttribute<Integer> iAttribute
          A simple attribute included in filterContext.
protected  edu.internet2.middleware.shibboleth.common.attribute.filtering.provider.MatchFunctor matchFunctor
          The Functor under test.
protected  edu.internet2.middleware.shibboleth.common.profile.provider.BaseSAMLProfileRequestContext requestContext
          Request Context included in filter context.
protected  edu.internet2.middleware.shibboleth.common.attribute.BaseAttribute<String> sAttribute
          A simple attribute included in filterContext.
protected  edu.internet2.middleware.shibboleth.common.attribute.provider.BasicAttribute<edu.internet2.middleware.shibboleth.common.attribute.provider.ScopedAttributeValue> scope
          A Scoped attributed included in filter context.
 
Constructor Summary
BaseTestCase()
           
 
Method Summary
protected  void setUp()
          
 void testBase()
          placeholder to allow us to test an entire folder.
protected  void testBoth(String testName, boolean expectedResult)
          Test for the expected result with base clase functor, (both PermitValue and PolicyRequirement).
protected  void testBoth(String testName, edu.internet2.middleware.shibboleth.common.attribute.filtering.provider.MatchFunctor functor, boolean expectedResult)
          Test for the expected result with the given function, (both PermitValue and PolicyRequirement).
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DATA_PATH

public static final String DATA_PATH
Base path for data files.

See Also:
Constant Field Values

filterContext

protected edu.internet2.middleware.shibboleth.common.attribute.filtering.provider.ShibbolethFilteringContext filterContext
Simple filtering context for use by tests.


iAttribute

protected edu.internet2.middleware.shibboleth.common.attribute.BaseAttribute<Integer> iAttribute
A simple attribute included in filterContext.


sAttribute

protected edu.internet2.middleware.shibboleth.common.attribute.BaseAttribute<String> sAttribute
A simple attribute included in filterContext.


scope

protected edu.internet2.middleware.shibboleth.common.attribute.provider.BasicAttribute<edu.internet2.middleware.shibboleth.common.attribute.provider.ScopedAttributeValue> scope
A Scoped attributed included in filter context.


requestContext

protected edu.internet2.middleware.shibboleth.common.profile.provider.BaseSAMLProfileRequestContext requestContext
Request Context included in filter context.


matchFunctor

protected edu.internet2.middleware.shibboleth.common.attribute.filtering.provider.MatchFunctor matchFunctor
The Functor under test.

Constructor Detail

BaseTestCase

public BaseTestCase()
Method Detail

setUp

protected void setUp()
              throws Exception

Overrides:
setUp in class junit.framework.TestCase
Throws:
Exception

testBoth

protected void testBoth(String testName,
                        edu.internet2.middleware.shibboleth.common.attribute.filtering.provider.MatchFunctor functor,
                        boolean expectedResult)
Test for the expected result with the given function, (both PermitValue and PolicyRequirement). Thuis method is particularly useful for the boolean cases.

Parameters:
testName - the error message to extrude
functor - what to test
expectedResult - whether we expect the test to succeed for fail

testBoth

protected void testBoth(String testName,
                        boolean expectedResult)
Test for the expected result with base clase functor, (both PermitValue and PolicyRequirement).

Parameters:
testName - error string to exit
expectedResult - whether we expect to pass or fail.

testBase

public void testBase()
placeholder to allow us to test an entire folder.



Copyright © 1999-2012. All Rights Reserved.