com.ibm.di.fc.rxaunittests
Class QA_TestRXACLFC

java.lang.Object
  extended by TestCase
      extended by com.ibm.di.fc.rxaunittests.QA_TestRXACLFC

public class QA_TestRXACLFC
extends TestCase

Basic tests for the SAP User Registry Connector.


Constructor Summary
QA_TestRXACLFC(String arg0)
          Class constructor.
 
Method Summary
static void main(String[] args)
          Run the JUnit test methods contained with this class (QA_TestRXACLFC.class).
 void prepareConnection(String type)
           
protected  void setUp()
          Initialise the variables used in the JUnit tests methods within this class.
protected  void tearDown()
          Clean up after running each of the test methods in preparation for the next test.
 void testAfterTerminate()
          Test that an appropriate error is given if an attempt to use the CLFC occurs after a call to terminate().
 void testAnyConnection()
          Test that a connection can be established when the selected connectionType is 'any' and a simple command can be executed.
 void testAS400Connection()
          Test that an Win Connection can be established and a simple command can be executed.
 void testAS400NonSSL()
          Test that attributes can be provided either on the GUI or in the Entry object supplied to the perform method.
 void testBeforeInitialize()
          Test that an appropriate error is given if an attempt to use the CLFC occurs before a call to initialize().
 void testCmdAttribute()
          Provide the command as an attribute within the entry object Expected output: A directory listing of the WIN_MACHINE
 void testCombinationGUIEntryAttr()
          Test that attributes can be provided either on the GUI or in the Entry object supplied to the perform method.
 void testDuplicatedAttrInEntryObject()
          Test that attributes provided in the Entry object override those provided on the GUI.
 void testNotAllPropsProvided()
          Test that an appropriate error is given if not all the required properties are given.
 void testREXECConnection()
          Test that an REXEC Connection can be established and a simple command can be executed.
 void testRSHConnection()
          Test that an RSH Connection can be established and a simple command can be executed.
 void testSSHPasswd()
          Test that an SSH Connection can be established using a userName, hostName and password and a simple command can be executed.
 void testStdinProvidedNoDestnDir()
          Standard input can be provided and will be used when performing the specified command.
 void testStdinProvidedWithDestnDir()
          Standard input can be provided and will be used when performing the specified command.
 void testWinConnection()
          Test that an Win Connection can be established and a simple command can be executed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QA_TestRXACLFC

public QA_TestRXACLFC(String arg0)
Class constructor.

Parameters:
arg0 - The argument supplied.
Method Detail

main

public static void main(String[] args)
Run the JUnit test methods contained with this class (QA_TestRXACLFC.class).

Parameters:
args - The array of supplied arguments.

setUp

protected final void setUp()
Initialise the variables used in the JUnit tests methods within this class.

Throws:
ConfigurationException - x

tearDown

protected final void tearDown()
                       throws Exception
Clean up after running each of the test methods in preparation for the next test.

Throws:
Exception - e

prepareConnection

public void prepareConnection(String type)

testSSHPasswd

public final void testSSHPasswd()
Test that an SSH Connection can be established using a userName, hostName and password and a simple command can be executed. Expected output: Directory listing of the SSH_MACHINE


testRSHConnection

public final void testRSHConnection()
Test that an RSH Connection can be established and a simple command can be executed. Expected output: Network configuration of the RSH_MACHINE


testREXECConnection

public final void testREXECConnection()
Test that an REXEC Connection can be established and a simple command can be executed. Expected output: Directory listing of the REXEC_MACHINE


testWinConnection

public final void testWinConnection()
Test that an Win Connection can be established and a simple command can be executed. Expected output: Directory listing of the WIN_MACHINE


testAS400Connection

public final void testAS400Connection()
Test that an Win Connection can be established and a simple command can be executed. Expected output: Directory listing of the WIN_MACHINE


testAnyConnection

public final void testAnyConnection()
Test that a connection can be established when the selected connectionType is 'any' and a simple command can be executed. Expected output: Protocol should be successfully selected. Directory listing of the WIN_MACHINE should be output.


testBeforeInitialize

public final void testBeforeInitialize()
Test that an appropriate error is given if an attempt to use the CLFC occurs before a call to initialize(). Expected output: A GeneralCLFCException should occur with error id RemoteCLFCMsgIds.NOT_INITIALIZED.


testCmdAttribute

public final void testCmdAttribute()
Provide the command as an attribute within the entry object Expected output: A directory listing of the WIN_MACHINE


testStdinProvidedWithDestnDir

public final void testStdinProvidedWithDestnDir()
Standard input can be provided and will be used when performing the specified command. If a destination dir is specified, the input file will be copied to a random folder on the destination directory. Expected output: The results of 'tac < /opt/IBM/IBMDirectoryIntegrator/Temp//stdin.txt' should be displayed. Where stdin.txt contains the contents from C:\\goodbye.txt.


testStdinProvidedNoDestnDir

public final void testStdinProvidedNoDestnDir()
Standard input can be provided and will be used when performing the specified command. If no destination dir is specified, the input file will be copied to a random folder in the system's native temporary directory. Expected output: The results of 'tac < /tmp//stdin.txt' should be displayed. Where stdin.txt contains the contents from C:\\goodbye.txt.


testDuplicatedAttrInEntryObject

public final void testDuplicatedAttrInEntryObject()
Test that attributes provided in the Entry object override those provided on the GUI. Expected output: The results of 'tac < /opt/IBM/IBMDirectoryIntegrator/Temp//stdin.txt' should be displayed. Where stdin.txt contains the contents from C:\\goodbye.txt.


testCombinationGUIEntryAttr

public final void testCombinationGUIEntryAttr()
Test that attributes can be provided either on the GUI or in the Entry object supplied to the perform method. Expected output: The results of 'tac < /opt/IBM/IBMDirectoryIntegrator/Temp//stdin.txt' should be displayed. Where stdin.txt contains the contents from C:\\goodbye.txt.


testNotAllPropsProvided

public final void testNotAllPropsProvided()
Test that an appropriate error is given if not all the required properties are given. Expected output: A ParamException with error id RemoteCLFCMsgIds.MISSING_PARAMS


testAfterTerminate

public final void testAfterTerminate()
Test that an appropriate error is given if an attempt to use the CLFC occurs after a call to terminate(). Expected output: A GeneralCLFCException with error code RemoteCLFCMsgIds.TERMINATED


testAS400NonSSL

public final void testAS400NonSSL()
Test that attributes can be provided either on the GUI or in the Entry object supplied to the perform method. Expected output: The results of 'tac < /opt/IBM/IBMDirectoryIntegrator/Temp//stdin.txt' should be displayed. Where stdin.txt contains the contents from C:\\goodbye.txt.