org.jboss.test.jbossmq.test
Class SecurityUnitTestCase
java.lang.Object
TestCase
org.jboss.test.JBossTestCase (src)
org.jboss.test.jbossmq.MQBase (src)
org.jboss.test.jbossmq.test.SecurityUnitTestCase
- public class SecurityUnitTestCase
- extends MQBase (src)
Test of security features in JBossMQ
- See Also:
- Serialized Form
Fields inherited from class org.jboss.test.jbossmq.MQBase (src) |
CONNECTOR, context, DEFAULT_RUNSLEEP, FAILSAFE_SUBSCRIBER, GETTER, log, PUBLISHER, QUEUE_FACTORY, queueFactory, SUBSCRIBER, TEST_QUEUE, TEST_TOPIC, TOPIC_FACTORY, topicFactory, TRANS_DESC, TRANS_INDIVIDUAL, TRANS_NONE, TRANS_TOTAL |
Methods inherited from class org.jboss.test.JBossTestCase (src) |
deploy, flushAuthCache, flushAuthCache, getBeanCount, getDeployerName, getDeploySetup, getDeployURL, getInitialContext, getIterationCount, getJndiInitFactory, getJndiURL, getLog, getResourceURL, getServer, getServerHost, getThreadCount, initDelegate, invoke, restartDBPool, testServerFound, undeploy |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SecurityUnitTestCase
public SecurityUnitTestCase(java.lang.String name)
runLoginTest
public void runLoginTest()
throws java.lang.Exception
- Throws:
java.lang.Exception
runLoginNoCred
public void runLoginNoCred()
throws java.lang.Exception
- Tests that check authentication
1. Login without cred
2. Login with valid usedid,pwd
3. Login with valid user, unvalid pwd
4. Login with unvalid user.
- Throws:
java.lang.Exception
runLoginValidCred
public void runLoginValidCred()
throws java.lang.Exception
- Throws:
java.lang.Exception
runLoginInvalidPwd
public void runLoginInvalidPwd()
throws java.lang.Exception
- Throws:
java.lang.Exception
runLoginInvalidCred
public void runLoginInvalidCred()
throws java.lang.Exception
- Throws:
java.lang.Exception
runClientIDNormalTest
public void runClientIDNormalTest()
throws java.lang.Exception
- An number of tests to verrify that clientID works as expected:
1. Nothing. getClientID should return a string starting withID
2. user/pwd with preconfigured clientID, should return preconf
3. setClientID, should return the set clientID
4. setClienID starting with ID, should trow invalid clientID
5. setClientID same as a preconf, should trow invalid clientID
6. setClientID after any method beeing invoked on con, throw invalid state
- Throws:
java.lang.Exception
runClientIDPreconfTest
public void runClientIDPreconfTest()
throws java.lang.Exception
- Throws:
java.lang.Exception
runClientIDSetTest
public void runClientIDSetTest()
throws java.lang.Exception
- Throws:
java.lang.Exception
runClientIDSetSteelPreconf
public void runClientIDSetSteelPreconf()
throws java.lang.Exception
- Throws:
java.lang.Exception
runClientIDSetAfterInvoke
public void runClientIDSetAfterInvoke()
throws java.lang.Exception
- Throws:
java.lang.Exception
runAuzValidTopicPublisher
public void runAuzValidTopicPublisher()
throws java.lang.Exception
- Tests to check autorization.
Remember there are actuallt two types of fails:
a) You are a user, but do no belong to a group that has acl.
b) You belong to a group, but that group does not have acl.
we test the first for topics and the second for queues, by
configuration in jbossmq-testsuite-service.xml
Tests that check autorization.
1. test valid topic publisher
2. test invalid topic publisher
3. test valid topic subscriber
4. test invalid topic subscriber
5. test valid queue sender
6. test invalid queue sender
7. test valid queue receiver
8. test invalid queue receiver
9. test valid queue browser.
10. test invalid queue browser
11. test preconf dur sub, to valid dest.
12. test preconf dur sub, to invalid dest.
13. test dyn dur sub, to valid dest.
14. test dyn dur sub, to valid dest.
- Throws:
java.lang.Exception
runAuzValidTopicPublisherTransaction
public void runAuzValidTopicPublisherTransaction()
throws java.lang.Exception
- Throws:
java.lang.Exception
runAuzInvalidTopicPublisher
public void runAuzInvalidTopicPublisher()
throws java.lang.Exception
- Throws:
java.lang.Exception
runAuzInvalidTopicPublisherTransaction
public void runAuzInvalidTopicPublisherTransaction()
throws java.lang.Exception
- Throws:
java.lang.Exception
runAuzValidTopicSubscriber
public void runAuzValidTopicSubscriber()
throws java.lang.Exception
- Throws:
java.lang.Exception
runAuzValidTopicSubscriberTransaction
public void runAuzValidTopicSubscriberTransaction()
throws java.lang.Exception
- Throws:
java.lang.Exception
runAuzInvalidTopicSubscriber
public void runAuzInvalidTopicSubscriber()
throws java.lang.Exception
- Throws:
java.lang.Exception
runAuzInvalidTopicSubscriberTransaction
public void runAuzInvalidTopicSubscriberTransaction()
throws java.lang.Exception
- Throws:
java.lang.Exception
runAuzValidQueueSender
public void runAuzValidQueueSender()
throws java.lang.Exception
- Throws:
java.lang.Exception
runAuzValidQueueSenderTransaction
public void runAuzValidQueueSenderTransaction()
throws java.lang.Exception
- Throws:
java.lang.Exception
runAuzInvalidQueueSender
public void runAuzInvalidQueueSender()
throws java.lang.Exception
- Throws:
java.lang.Exception
runAuzInvalidQueueSenderTransaction
public void runAuzInvalidQueueSenderTransaction()
throws java.lang.Exception
- Throws:
java.lang.Exception
runAuzValidQueueReceiver
public void runAuzValidQueueReceiver()
throws java.lang.Exception
- Throws:
java.lang.Exception
runAuzValidQueueReceiverTransaction
public void runAuzValidQueueReceiverTransaction()
throws java.lang.Exception
- Throws:
java.lang.Exception
runAuzInvalidQueueReceiver
public void runAuzInvalidQueueReceiver()
throws java.lang.Exception
- Throws:
java.lang.Exception
runAuzInvalidQueueReceiverTransaction
public void runAuzInvalidQueueReceiverTransaction()
throws java.lang.Exception
- Throws:
java.lang.Exception
runAuzValidQueueBrowser
public void runAuzValidQueueBrowser()
throws java.lang.Exception
- Throws:
java.lang.Exception
runAuzInvalidQueueBrowser
public void runAuzInvalidQueueBrowser()
throws java.lang.Exception
- Throws:
java.lang.Exception
runValidPreconfDurSub
public void runValidPreconfDurSub()
throws java.lang.Exception
- Throws:
java.lang.Exception
runInvalidPreconfDurSub
public void runInvalidPreconfDurSub()
throws java.lang.Exception
- Throws:
java.lang.Exception
runValidDynDurSub
public void runValidDynDurSub()
throws java.lang.Exception
- Throws:
java.lang.Exception
runInvalidDynDurSub
public void runInvalidDynDurSub()
throws java.lang.Exception
- Throws:
java.lang.Exception
suite
public static junit.framework.Test suite()
throws java.lang.Exception
- Throws:
java.lang.Exception
main
public static void main(java.lang.String[] args)