Testing Jazz repository connection data [message #1706409] |
Wed, 26 August 2015 12:45  |
Eclipse User |
|
|
|
I have Jazz repository connection data entered by a user that I would like to test for correctness.
The JazzFormAuthClient.formLogin method looks like something I could use. So I tried the following:
try
{
JazzFormAuthClient client = new JazzFormAuthClient( repositoryUrl,
repositoryUserId, repositoryPassword );
client.formLogin();
System.out.print( "result: " + Integer.toString( result ) );
}
catch (OslcClientApplicationException e)
{
// handle exception
}
However when repositoryUrl, repositoryUserId, and repositoryPassword are all set to "test", no exception is thrown. I would expect an exception to be thrown since repositoryUrl has invalid syntax.
I notice from the JazzFormAuthClient.formLogin Javadoc that it returns an int, though the return value is not actually documented. So I tried:
try
{
JazzFormAuthClient client = new JazzFormAuthClient( repositoryUrl,
repositoryUserId, repositoryPassword );
client.formLogin();
int result = client.formLogin();
System.out.print( "result: " + Integer.toString( result ) );
}
catch (OslcClientApplicationException e)
{
// handle exception
}
With this code, I found that when repositoryUrl, repositoryUserId, and repositoryPassword are all set to "test", JazzFormAuthClient.formLogin returns -1.
I have the following questions:
1. Why doesn't JazzFormAuthClient.formLogin throw an exception when repositoryUrl is invalid?
2. What are the possible values returned by JazzFormAuthClient.formLogin and what does each value mean?
3. Is there a better way of testing Jazz repository connection data using the Lyo OSLC4J library?
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03223 seconds