com.redhat.rhn.common.security.acl.test
Class AclTest

java.lang.Object
  extended by TestCase
      extended by com.redhat.rhn.testing.RhnBaseTestCase
          extended by com.redhat.rhn.common.security.acl.test.AclTest

public class AclTest
extends RhnBaseTestCase


Nested Class Summary
static class AclTest.MockAclHandler
           
static class AclTest.MockAclHandlerWithFunkyNames
          A handler class with a variety of names to test that method names get converted to acl names correctly.
 
Constructor Summary
AclTest(java.lang.String name)
          Constructor
 
Method Summary
 void setUp()
          Sets up the acl, handler, and context objects.
 void tearDown()
          Tears down the acl, handler, and context objects.
 void test()
           
 void testBadHandler()
           
 void testBadRegisterByClass()
           
 void testBadRegisterByString()
           
 void testBadSyntax()
           
 void testCompoundAcl()
           
 void testGetAclHandlerNames()
           
 void testMethodNameToAclName()
          Makes sure that method names are properly converted to acl handler names.
 void testMultipleAndStatementsAcl()
           
 void testMultipleOrStatementsAcl()
           
 void testRegisterByClass()
           
 void testRegisterByString()
           
 void testSimpleAcl()
           
 void testStringArrayConstructor()
           
 
Methods inherited from class com.redhat.rhn.testing.RhnBaseTestCase
assertContains, assertContains, assertContains, assertNotBefore, assertNotBefore, assertNotEmpty, assertNotEmpty, assertPropertyEquals, clearSession, commitAndCloseSession, disableLocalizationServiceLogging, enableLocalizationServiceLogging, flushAndEvict, getNow, reload, reload
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AclTest

public AclTest(java.lang.String name)
Constructor

Parameters:
name - test name
Method Detail

setUp

public void setUp()
Sets up the acl, handler, and context objects.

Overrides:
setUp in class RhnBaseTestCase

tearDown

public void tearDown()
Tears down the acl, handler, and context objects.

Overrides:
tearDown in class RhnBaseTestCase
See Also:
TestCase#tearDown(), HibernateFactory.closeSession()

testSimpleAcl

public void testSimpleAcl()

testMultipleOrStatementsAcl

public void testMultipleOrStatementsAcl()

testMultipleAndStatementsAcl

public void testMultipleAndStatementsAcl()

testCompoundAcl

public void testCompoundAcl()

testBadHandler

public void testBadHandler()

testBadSyntax

public void testBadSyntax()

test

public void test()

testMethodNameToAclName

public void testMethodNameToAclName()
Makes sure that method names are properly converted to acl handler names. Tests the following:
method nameacl handler name aclTheQuickBrownFoxJumpedOverTheLazyDog the_quick_brown_fox_jumped_over_the_lazy_dog
method nameacl handler name aclTestXMLFiletest_xml_file aclTestXtest_x aclTestXMLtest_xml


testRegisterByClass

public void testRegisterByClass()

testBadRegisterByClass

public void testBadRegisterByClass()

testRegisterByString

public void testRegisterByString()

testBadRegisterByString

public void testBadRegisterByString()

testStringArrayConstructor

public void testStringArrayConstructor()

testGetAclHandlerNames

public void testGetAclHandlerNames()