org.jboss.test.jaxr.common
Class JaxrTestCase

java.lang.Object
  extended byTestCase
      extended byorg.jboss.test.jaxr.common.JaxrTestCase
Direct Known Subclasses:
CreateOrganizationTestCase (src) , JaxrDeleteTestCase (src) , JaxrReadTestCase (src)

public class JaxrTestCase
extends TestCase

Base class for the Jaxr testsuite

See Also:
Serialized Form

Field Summary
protected  ServiceBinding (src) binding
           
protected  BusinessLifeCycleManager (src) blcm
           
protected  BusinessQueryManager (src) bqm
           
protected  Connection (src) connection
           
protected  java.lang.String password
           
protected  java.lang.String publishurl
           
protected  java.lang.String queryurl
           
protected  RegistryService (src) registryservice
           
protected  Service (src) service
           
protected  java.lang.String username
           
 
Constructor Summary
JaxrTestCase()
           
JaxrTestCase(java.lang.String name)
          Constructor for the JaxrTestCase object
 
Method Summary
protected  void authenticate()
          Authenticate against the registry (Needed before Publish)
protected  void clearOrganizations(java.lang.String name)
          For testing purposes, remove all old organizations lying in the registry with a given name.
protected  java.lang.String createOrganization()
          Create an Organization object using JAXR and return the Key
protected  void deleteOrganization(Key (src)  orgkey)
          Delete an Organization with a given key
protected  void deleteOrganizations(java.util.Collection keys)
          Delete an Organization with a given key
protected  BusinessLifeCycleManager (src) getBusinessLifeCycleManager()
          Get the BusinessLifeCycleManager
protected  BusinessQueryManager (src) getBusinessQueryManager()
          Get the BusinessQueryManager
protected  Classification (src) getClassification(java.lang.String schemename, java.lang.String name, java.lang.String value)
          Create a Classification object
protected  Connection (src) getConnection()
          Get a JaxrConnection
protected  EmailAddress (src) getEmailAddress(java.lang.String email)
          Create an Email Address Object
protected  InternationalString (src) getIS(java.lang.String str)
          Creates an instance of InternationalString
protected  Logger (src) getLog()
          Get the log
protected  Organization (src) getOrganization(java.lang.String name, java.lang.String desc)
          Create an Organization object
protected  User (src) getPrimaryContact(java.lang.String name)
          Create a Primary Contact
protected  RegistryService (src) getRegistryService()
          Get the RegistryService
protected  Service (src) getService(java.lang.String servicename, java.lang.String servicedesc)
          Create a Service
protected  ServiceBinding (src) getServiceBinding(java.lang.String descr, boolean validateurl, java.lang.String url)
          Create a ServiceBinding
protected  TelephoneNumber (src) getTelephoneNumber(java.lang.String telnumb)
          Create a Telephone Number object
protected  void releaseConnection()
          Release the Jaxr Connection Object
 void setUp()
           
 void tearDown()
           
 void testAuthentication()
          Test Aunthentication against the JAxr Regisrty
 void testJaxrConnection()
          Test obtaining a JaxrConnection
 void testRegistryService()
          Tests the RegistryService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

connection

protected Connection (src)  connection

registryservice

protected RegistryService (src)  registryservice

blcm

protected BusinessLifeCycleManager (src)  blcm

bqm

protected BusinessQueryManager (src)  bqm

queryurl

protected java.lang.String queryurl

publishurl

protected java.lang.String publishurl

username

protected java.lang.String username

password

protected java.lang.String password

service

protected Service (src)  service

binding

protected ServiceBinding (src)  binding
Constructor Detail

JaxrTestCase

public JaxrTestCase()

JaxrTestCase

public JaxrTestCase(java.lang.String name)
Constructor for the JaxrTestCase object

Parameters:
name - Test case name
Method Detail

setUp

public void setUp()
           throws java.lang.Exception
Throws:
java.lang.Exception

tearDown

public void tearDown()
              throws java.lang.Exception
Throws:
java.lang.Exception

testAuthentication

public void testAuthentication()
                        throws java.lang.Exception
Test Aunthentication against the JAxr Regisrty

Throws:
java.lang.Exception

testJaxrConnection

public void testJaxrConnection()
                        throws java.lang.Exception
Test obtaining a JaxrConnection

Throws:
java.lang.Exception

testRegistryService

public void testRegistryService()
                         throws java.lang.Exception
Tests the RegistryService

Throws:
java.lang.Exception

getConnection

protected Connection (src)  getConnection()
                            throws java.lang.Exception
Get a JaxrConnection

Returns:
Throws:
java.lang.Exception

getRegistryService

protected RegistryService (src)  getRegistryService()
                                      throws java.lang.Exception
Get the RegistryService

Returns:
Throws:
java.lang.Exception

getBusinessLifeCycleManager

protected BusinessLifeCycleManager (src)  getBusinessLifeCycleManager()
                                                        throws java.lang.Exception
Get the BusinessLifeCycleManager

Returns:
Throws:
java.lang.Exception

getBusinessQueryManager

protected BusinessQueryManager (src)  getBusinessQueryManager()
                                                throws java.lang.Exception
Get the BusinessQueryManager

Returns:
Throws:
java.lang.Exception

releaseConnection

protected void releaseConnection()
                          throws java.lang.Exception
Release the Jaxr Connection Object

Throws:
java.lang.Exception

authenticate

protected void authenticate()
                     throws java.lang.Exception
Authenticate against the registry (Needed before Publish)

Throws:
java.lang.Exception

getLog

protected Logger (src)  getLog()
Get the log

Returns:

createOrganization

protected java.lang.String createOrganization()
                                       throws java.lang.Exception
Create an Organization object using JAXR and return the Key

Throws:
java.lang.Exception

deleteOrganization

protected void deleteOrganization(Key (src)  orgkey)
                           throws java.lang.Exception
Delete an Organization with a given key

Parameters:
orgkey -
Throws:
java.lang.Exception

deleteOrganizations

protected void deleteOrganizations(java.util.Collection keys)
                            throws java.lang.Exception
Delete an Organization with a given key

Parameters:
keys -
Throws:
java.lang.Exception

getIS

protected InternationalString (src)  getIS(java.lang.String str)
                             throws java.lang.Exception
Creates an instance of InternationalString

Parameters:
str -
Returns:
Throws:
java.lang.Exception

getClassification

protected Classification (src)  getClassification(java.lang.String schemename,
                                           java.lang.String name,
                                           java.lang.String value)
                                    throws java.lang.Exception
Create a Classification object

Parameters:
schemename -
name -
value -
Returns:
Throws:
java.lang.Exception

getOrganization

protected Organization (src)  getOrganization(java.lang.String name,
                                       java.lang.String desc)
                                throws java.lang.Exception
Create an Organization object

Parameters:
name -
desc -
Returns:
Throws:
java.lang.Exception

getPrimaryContact

protected User (src)  getPrimaryContact(java.lang.String name)
                          throws java.lang.Exception
Create a Primary Contact

Parameters:
name -
Returns:
Throws:
java.lang.Exception

getTelephoneNumber

protected TelephoneNumber (src)  getTelephoneNumber(java.lang.String telnumb)
                                      throws java.lang.Exception
Create a Telephone Number object

Parameters:
telnumb -
Returns:
Throws:
java.lang.Exception

getEmailAddress

protected EmailAddress (src)  getEmailAddress(java.lang.String email)
                                throws java.lang.Exception
Create an Email Address Object

Parameters:
email -
Returns:
Throws:
java.lang.Exception

getService

protected Service (src)  getService(java.lang.String servicename,
                             java.lang.String servicedesc)
                      throws java.lang.Exception
Create a Service

Parameters:
servicename -
servicedesc -
Returns:
Throws:
java.lang.Exception

getServiceBinding

protected ServiceBinding (src)  getServiceBinding(java.lang.String descr,
                                           boolean validateurl,
                                           java.lang.String url)
                                    throws java.lang.Exception
Create a ServiceBinding

Parameters:
descr -
validateurl - Whether you need to validate the url.
url -
Returns:
Throws:
java.lang.Exception

clearOrganizations

protected void clearOrganizations(java.lang.String name)
                           throws java.lang.Exception
For testing purposes, remove all old organizations lying in the registry with a given name. We will be adding an org and checking its key when we query

Parameters:
name -
Throws:
java.lang.Exception