[jboss-svn-commits] JBL Code SVN: r31894 - in labs/jbosstm/trunk/XTS: WS-C and 33 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Mar 1 11:40:42 EST 2010
Author: adinn
Date: 2010-03-01 11:40:31 -0500 (Mon, 01 Mar 2010)
New Revision: 31894
Added:
labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/qa/junit/TestRunnerServlet.java
labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/qa/junit/TestRunnerXMLServlet.java
Removed:
labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/qa/
labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/qa/
labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/qa/junit/WSASTestRunnerServlet.java
labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/qa/junit/WSASTestRunnerXMLServlet.java
labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/qa/
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/qa/
Modified:
labs/jbosstm/trunk/XTS/WS-C/build.xml
labs/jbosstm/trunk/XTS/WS-C/tests/dd/ws-c-tests_application.xml
labs/jbosstm/trunk/XTS/WS-C/tests/dd/ws-c-tests_web-app.xml
labs/jbosstm/trunk/XTS/WS-C/tests/dd/ws-c11-tests_application.xml
labs/jbosstm/trunk/XTS/WS-C/tests/dd/ws-c11-tests_web-app.xml
labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/junit/ActivationServiceExceptionTestCase.java
labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/junit/ActivationServiceTestCase.java
labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/junit/ActivationTestCase.java
labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/junit/EnduranceTestCase.java
labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/junit/RegistrationServiceExceptionTestCase.java
labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/junit/RegistrationServiceTestCase.java
labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/junit/RegistrationTestCase.java
labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/junit/TestSuite.java
labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/junit/ThreadedEnduranceTestCase.java
labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/ActivationServiceExceptionTestCase.java
labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/ActivationServiceTestCase.java
labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/ActivationTestCase.java
labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/EnduranceTestCase.java
labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/RegistrationServiceExceptionTestCase.java
labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/RegistrationServiceTestCase.java
labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/RegistrationTestCase.java
labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/TestSuite.java
labs/jbosstm/trunk/XTS/WS-T/build.xml
labs/jbosstm/trunk/XTS/WS-T/tests/dd/ws-t-tests_application.xml
labs/jbosstm/trunk/XTS/WS-T/tests/dd/ws-t-tests_web-app.xml
labs/jbosstm/trunk/XTS/WS-T/tests/dd/ws-t11-tests_application.xml
labs/jbosstm/trunk/XTS/WS-T/tests/dd/ws-t11-tests_web-app.xml
labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/BusinessActivityTerminatorServiceTestCase.java
labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/BusinessAgreementWithCoordinatorCompletionCoordinatorTestCase.java
labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/BusinessAgreementWithCoordinatorCompletionParticipantTestCase.java
labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/BusinessAgreementWithCoordinatorCompletionServiceTestCase.java
labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/BusinessAgreementWithParticipantCompletionCoordinatorTestCase.java
labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/BusinessAgreementWithParticipantCompletionParticipantTestCase.java
labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/BusinessAgreementWithParticipantCompletionServiceTestCase.java
labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/CompletionCoordinatorTestCase.java
labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/CompletionParticipantTestCase.java
labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/CompletionServiceTestCase.java
labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/TestSuite.java
labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/TwoPCCoordinatorTestCase.java
labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/TwoPCParticipantTestCase.java
labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/TwoPCServiceTestCase.java
labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst11/tests/junit/BusinessAgreementWithCoordinatorCompletionCoordinatorTestCase.java
labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst11/tests/junit/BusinessAgreementWithCoordinatorCompletionParticipantTestCase.java
labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst11/tests/junit/BusinessAgreementWithParticipantCompletionCoordinatorTestCase.java
labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst11/tests/junit/BusinessAgreementWithParticipantCompletionParticipantTestCase.java
labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst11/tests/junit/CompletionCoordinatorTestCase.java
labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst11/tests/junit/CompletionParticipantTestCase.java
labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst11/tests/junit/TestSuite.java
labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst11/tests/junit/TwoPCCoordinatorTestCase.java
labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst11/tests/junit/TwoPCParticipantTestCase.java
labs/jbosstm/trunk/XTS/WSAS/build.xml
labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/WSASTestSuite.java
labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/basic/Context.java
labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/basic/Hierarchy.java
labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/basic/NestedActivity.java
labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/basic/NullEnd.java
labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/basic/Resume.java
labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/basic/StartEnd.java
labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/basic/StatusCheck.java
labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/basic/Suspend.java
labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/basic/Timeout.java
labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/hls/Context1.java
labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/hls/Context2.java
labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/hls/Service.java
labs/jbosstm/trunk/XTS/WSAS/tests/dd/wsas-tests_application.xml
labs/jbosstm/trunk/XTS/WSAS/tests/dd/wsas-tests_web-app.xml
labs/jbosstm/trunk/XTS/WSCF/build.xml
labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/WSCFTestSuite.java
labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/as/jta/TopLevel1.java
labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/AddParticipant.java
labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/AddSynchronization.java
labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/BeginCancel.java
labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/BeginConfirm.java
labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/CancelOnlyCancel.java
labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/CancelOnlyConfirm.java
labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/ContextOutput.java
labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/ParticipantSynchronization.java
labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/StartEnd.java
labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/Suspend.java
labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/SuspendConfirm.java
labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/SuspendParticipant.java
labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/SuspendResume.java
labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/WscContext.java
labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/WscNestedContext.java
labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/WscTranslateContext.java
labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/WSCF11TestSuite.java
labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/AddParticipant.java
labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/AddSynchronization.java
labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/BeginCancel.java
labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/BeginConfirm.java
labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/CancelOnlyCancel.java
labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/CancelOnlyConfirm.java
labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/ParticipantSynchronization.java
labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/StartEnd.java
labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/Suspend.java
labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/SuspendConfirm.java
labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/SuspendParticipant.java
labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/SuspendResume.java
labs/jbosstm/trunk/XTS/WSCF/tests/dd/wscf-tests_application.xml
labs/jbosstm/trunk/XTS/WSCF/tests/dd/wscf-tests_web-app.xml
labs/jbosstm/trunk/XTS/WSCF/tests/dd/wscf11-tests_application.xml
labs/jbosstm/trunk/XTS/WSCF/tests/dd/wscf11-tests_web-app.xml
labs/jbosstm/trunk/XTS/WSTX/build.xml
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/WSTXTestSuite.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/Cancel.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/Close.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/Compensate.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/ConfirmWithComplete.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/Exit.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/MultiCancel.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/MultiClose.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/MultiCompensate.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/CommitExceptionInCommit.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/CommitExceptionInPrepare.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/CommitRollbackInPrepare.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/MultiParticipants.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/NestedTransaction.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/NullCommitTransaction.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/NullRollbackTransaction.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/PrintTransaction.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/ResumeNullTransaction.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/RollbackExceptionInRollback.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SingleParticipant.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SubtransactionCommit.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SubtransactionCommitFailInPrepare.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SubtransactionCommitRollbackInPrepare.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SubtransactionRollback.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SuspendCommitTransaction.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SuspendNullTransaction.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SuspendResumeCommitTransaction.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SuspendResumeParticipants.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SuspendResumeSingleParticipant.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SuspendTransaction.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SynchronizationParticipant.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/ThreadedTransaction.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/WSTX11TestSuite.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/ba/Cancel.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/ba/Close.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/ba/Compensate.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/ba/ConfirmWithComplete.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/ba/Exit.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/ba/MultiCancel.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/ba/MultiClose.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/ba/MultiCompensate.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/CommitExceptionInPrepare.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/CommitRollbackInPrepare.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/MultiParticipants.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/NestedTransaction.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/NullCommitTransaction.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/NullRollbackTransaction.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/PrintTransaction.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/ResumeNullTransaction.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/RollbackExceptionInRollback.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/SingleParticipant.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/SubtransactionCommit.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/SubtransactionCommitFailInPrepare.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/SubtransactionCommitRollbackInPrepare.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/SubtransactionRollback.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/SuspendCommitTransaction.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/SuspendNullTransaction.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/SuspendResumeCommitTransaction.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/SuspendResumeParticipants.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/SuspendResumeSingleParticipant.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/SuspendTransaction.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/ThreadedTransaction.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wstx/tests/junit/basic/NullCommitTransaction.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wstx/tests/junit/basic/NullNestedCommit.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wstx/tests/junit/basic/NullNestedRollback.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wstx/tests/junit/basic/NullRollbackOnly.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wstx/tests/junit/basic/NullRollbackTransaction.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wstx/tests/junit/basic/SingleParticipant.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wstx/tests/junit/basic/SynchronizationParticipant.java
labs/jbosstm/trunk/XTS/WSTX/tests/dd/wstx-tests_application.xml
labs/jbosstm/trunk/XTS/WSTX/tests/dd/wstx-tests_web-app.xml
labs/jbosstm/trunk/XTS/WSTX/tests/dd/wstx11-tests_application.xml
labs/jbosstm/trunk/XTS/WSTX/tests/dd/wstx11-tests_web-app.xml
labs/jbosstm/trunk/XTS/sharedbuild.xml
Log:
converted to use junit lib from JBossTS and switched unti tests to use new annotation-based junit. also collapsed muiltiple copies of test runner into one shared class -- fixes for JBTM-706
Modified: labs/jbosstm/trunk/XTS/WS-C/build.xml
===================================================================
--- labs/jbosstm/trunk/XTS/WS-C/build.xml 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-C/build.xml 2010-03-01 16:40:31 UTC (rev 31894)
@@ -62,6 +62,8 @@
<property name="build.tests.dd.dir" value="${build.dir}/tests/dd"/>
<property name="build.tests.webapps.dir" value="${build.dir}/tests/webapps"/>
+ <property name="wsas.tests.build.lib.dir" value="../WSAS/tests/build/lib"/>
+
<!-- classes provided for clients via api jar -->
<property name="ws-c.api.classes" value="com/arjuna/wsc/AlreadyRegisteredException.class"/>
<!-- we had to delete the JaxRPC handlers so we export the bist needed to allow clients to create them -->
@@ -261,28 +263,38 @@
</copy>
<copy file="${tests.dd.dir}/ws-c11-tests_web-app.xml" tofile="${build.tests.dd.dir}/web-app11.xml">
</copy>
+ <jar jarfile="${build.tests.lib.dir}/xts-test-servlet.jar">
+ <fileset dir="${build.tests.classes.dir}" includes="com/arjuna/qa/junit/*.class"/>
+ </jar>
+ <jar jarfile="${build.tests.lib.dir}/ws-c-tests.jar">
+ <fileset dir="${build.tests.classes.dir}" />
+ </jar>
<war warfile="${build.tests.webapps.dir}/ws-c-tests.war" webxml="${build.tests.dd.dir}/web-app.xml">
- <classes dir="${build.tests.classes.dir}"/>
</war>
<war warfile="${build.tests.webapps.dir}/ws-c11-tests.war" webxml="${build.tests.dd.dir}/web-app11.xml">
- <classes dir="${build.tests.classes.dir}"/>
</war>
<ear earfile="${build.tests.webapps.dir}/ws-c-tests.ear" appxml="${tests.dd.dir}/ws-c-tests_application.xml">
<fileset dir="${xts.ext.dir}" includes="${tests.libs}"/>
<fileset dir="${build.tests.webapps.dir}" includes="ws-c-tests.war"/>
<fileset dir="${build.tests.webapps.dir}" includes="ws-c11-tests.war"/>
+ <fileset dir="${build.tests.lib.dir}" includes="ws-c-tests.jar"/>
+ <fileset dir="${wsas.tests.build.lib.dir}" includes="xts-test-servlet.jar"/>
</ear>
</target>
<target name="tests-webapps11" depends="tests-compile11" >
<copy file="${tests.dd.dir}/ws-c11-tests_web-app.xml" tofile="${build.tests.dd.dir}/web-app11.xml">
</copy>
+ <jar jarfile="${build.tests.lib.dir}/xts-test-servlet.jar">
+ <fileset dir="${build.tests.classes.dir}" includes="com/arjuna/qa/junit/*.class"/>
+ </jar>
<war warfile="${build.tests.webapps.dir}/ws-c11-tests.war" webxml="${build.tests.dd.dir}/web-app11.xml">
- <classes dir="${build.tests.classes.dir}"/>
+ <classes dir="${build.tests.classes.dir}" excludes="com/arjuna/qa/junit/**/*.class"/>
</war>
<ear earfile="${build.tests.webapps.dir}/ws-c-tests.ear" appxml="${tests.dd.dir}/ws-c11-tests_application.xml">
<fileset dir="${xts.ext.dir}" includes="${tests.libs}"/>
<fileset dir="${build.tests.webapps.dir}" includes="ws-c11-tests.war"/>
+ <fileset dir="${wsas.tests.build.lib.dir}" includes="xts-test-servlet.jar"/>
</ear>
</target>
Modified: labs/jbosstm/trunk/XTS/WS-C/tests/dd/ws-c-tests_application.xml
===================================================================
--- labs/jbosstm/trunk/XTS/WS-C/tests/dd/ws-c-tests_application.xml 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-C/tests/dd/ws-c-tests_application.xml 2010-03-01 16:40:31 UTC (rev 31894)
@@ -40,7 +40,16 @@
<context-root>/ws-c11-tests</context-root>
</web>
</module>
+
<module>
+ <java>ws-c-tests.jar</java>
+ </module>
+
+ <module>
+ <java>xts-test-servlet.jar</java>
+ </module>
+
+ <module>
<java>junit.jar</java>
</module>
</application>
Modified: labs/jbosstm/trunk/XTS/WS-C/tests/dd/ws-c-tests_web-app.xml
===================================================================
--- labs/jbosstm/trunk/XTS/WS-C/tests/dd/ws-c-tests_web-app.xml 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-C/tests/dd/ws-c-tests_web-app.xml 2010-03-01 16:40:31 UTC (rev 31894)
@@ -34,7 +34,7 @@
<servlet>
<servlet-name>JUnitTestsServlet</servlet-name>
- <servlet-class>com.arjuna.qa.junit.WSCTestRunnerServlet</servlet-class>
+ <servlet-class>com.arjuna.qa.junit.TestRunnerServlet</servlet-class>
<init-param>
<param-name>TestSuiteClassName</param-name>
<param-value>com.arjuna.wsc.tests.junit.TestSuite</param-value>
@@ -44,7 +44,7 @@
<servlet>
<servlet-name>JUnitTestsXMLServlet</servlet-name>
- <servlet-class>com.arjuna.qa.junit.WSCTestRunnerXMLServlet</servlet-class>
+ <servlet-class>com.arjuna.qa.junit.TestRunnerXMLServlet</servlet-class>
<init-param>
<param-name>TestSuiteClassName</param-name>
<param-value>com.arjuna.wsc.tests.junit.TestSuite</param-value>
Modified: labs/jbosstm/trunk/XTS/WS-C/tests/dd/ws-c11-tests_application.xml
===================================================================
--- labs/jbosstm/trunk/XTS/WS-C/tests/dd/ws-c11-tests_application.xml 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-C/tests/dd/ws-c11-tests_application.xml 2010-03-01 16:40:31 UTC (rev 31894)
@@ -33,7 +33,16 @@
<context-root>/ws-c11-tests</context-root>
</web>
</module>
+
<module>
+ <java>ws-c-tests.jar</java>
+ </module>
+
+ <module>
+ <java>xts-test-servlet.jar</java>
+ </module>
+
+ <module>
<java>junit.jar</java>
</module>
</application>
Modified: labs/jbosstm/trunk/XTS/WS-C/tests/dd/ws-c11-tests_web-app.xml
===================================================================
--- labs/jbosstm/trunk/XTS/WS-C/tests/dd/ws-c11-tests_web-app.xml 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-C/tests/dd/ws-c11-tests_web-app.xml 2010-03-01 16:40:31 UTC (rev 31894)
@@ -34,7 +34,7 @@
<servlet>
<servlet-name>JUnitTestsServlet</servlet-name>
- <servlet-class>com.arjuna.qa.junit.WSCTestRunnerServlet</servlet-class>
+ <servlet-class>com.arjuna.qa.junit.TestRunnerServlet</servlet-class>
<init-param>
<param-name>TestSuiteClassName</param-name>
<param-value>com.arjuna.wsc11.tests.junit.TestSuite</param-value>
@@ -44,7 +44,7 @@
<servlet>
<servlet-name>JUnitTestsXMLServlet</servlet-name>
- <servlet-class>com.arjuna.qa.junit.WSCTestRunnerXMLServlet</servlet-class>
+ <servlet-class>com.arjuna.qa.junit.TestRunnerXMLServlet</servlet-class>
<init-param>
<param-name>TestSuiteClassName</param-name>
<param-value>com.arjuna.wsc11.tests.junit.TestSuite</param-value>
Modified: labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/junit/ActivationServiceExceptionTestCase.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/junit/ActivationServiceExceptionTestCase.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/junit/ActivationServiceExceptionTestCase.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -26,25 +26,30 @@
package com.arjuna.wsc.tests.junit;
-import junit.framework.TestCase;
-
import com.arjuna.webservices.SoapRegistry;
import com.arjuna.webservices.wscoor.CoordinationConstants;
import com.arjuna.wsc.ActivationCoordinator;
import com.arjuna.wsc.InvalidCreateParametersException;
import com.arjuna.wsc.tests.TestUtil;
-public class ActivationServiceExceptionTestCase extends TestCase
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+public class ActivationServiceExceptionTestCase
{
private String activationCoordinatorURI ;
- protected void setUp()
+ @Before
+ public void setUp()
throws Exception
{
final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
activationCoordinatorURI = soapRegistry.getServiceURI(CoordinationConstants.SERVICE_ACTIVATION_COORDINATOR) ;
}
+ @Test
public void testInvalidCreateParametersException()
throws Exception
{
@@ -62,7 +67,8 @@
}
}
- protected void tearDown()
+ @After
+ public void tearDown()
throws Exception
{
}
Modified: labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/junit/ActivationServiceTestCase.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/junit/ActivationServiceTestCase.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/junit/ActivationServiceTestCase.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -26,8 +26,6 @@
package com.arjuna.wsc.tests.junit;
-import junit.framework.TestCase;
-
import com.arjuna.webservices.SoapRegistry;
import com.arjuna.webservices.wscoor.CoordinationConstants;
import com.arjuna.webservices.wscoor.CoordinationContextType;
@@ -35,17 +33,24 @@
import com.arjuna.wsc.InvalidCreateParametersException;
import com.arjuna.wsc.tests.TestUtil;
-public class ActivationServiceTestCase extends TestCase
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+public class ActivationServiceTestCase
{
private String activationCoordinatorURI ;
-
- protected void setUp()
+
+ @Before
+ public void setUp()
throws Exception
{
final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
activationCoordinatorURI = soapRegistry.getServiceURI(CoordinationConstants.SERVICE_ACTIVATION_COORDINATOR) ;
}
+ @Test
public void testKnownCoordinationType()
throws Exception
{
@@ -68,6 +73,7 @@
}
}
+ @Test
public void testUnknownCoordinationType()
throws Exception
{
@@ -85,7 +91,8 @@
}
}
- protected void tearDown()
+ @After
+ public void tearDown()
throws Exception
{
}
Modified: labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/junit/ActivationTestCase.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/junit/ActivationTestCase.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/junit/ActivationTestCase.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -28,8 +28,12 @@
import javax.xml.namespace.QName;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
import com.arjuna.webservices.SoapFault;
import com.arjuna.webservices.SoapFaultType;
import com.arjuna.webservices.SoapRegistry;
@@ -51,15 +55,16 @@
import com.arjuna.wsc.tests.TestUtil;
import com.arjuna.wsc.tests.junit.TestActivationCoordinatorProcessor.CreateCoordinationContextDetails;
-public class ActivationTestCase extends TestCase
+public class ActivationTestCase
{
private ActivationCoordinatorProcessor origActivationCoordinatorProcessor ;
private TestActivationCoordinatorProcessor testActivationCoordinatorProcessor = new TestActivationCoordinatorProcessor() ;
private EndpointReferenceType activationCoordinatorService ;
private EndpointReferenceType activationRequesterService ;
-
- protected void setUp()
+
+ @Before
+ public void setUp()
throws Exception
{
origActivationCoordinatorProcessor = ActivationCoordinatorProcessor.setCoordinator(testActivationCoordinatorProcessor) ;
@@ -70,6 +75,7 @@
activationRequesterService = new EndpointReferenceType(new AttributedURIType(activationRequesterServiceURI)) ;
}
+ @Test
public void testRequestWithoutExpiresWithoutCurrentContext()
throws Exception
{
@@ -80,7 +86,8 @@
executeRequestTest(messageId, coordinationType, expires, coordinationContext) ;
}
-
+
+ @Test
public void testRequestWithExpiresWithoutCurrentContext()
throws Exception
{
@@ -92,6 +99,7 @@
executeRequestTest(messageId, coordinationType, expires, coordinationContext) ;
}
+ @Test
public void testRequestWithoutExpiresWithCurrentContextWithoutExpires()
throws Exception
{
@@ -106,6 +114,7 @@
executeRequestTest(messageId, coordinationType, expires, coordinationContext) ;
}
+ @Test
public void testRequestWithoutExpiresWithCurrentContextWithExpires()
throws Exception
{
@@ -121,6 +130,7 @@
executeRequestTest(messageId, coordinationType, expires, coordinationContext) ;
}
+ @Test
public void testRequestWithExpiresWithCurrentContextWithoutExpires()
throws Exception
{
@@ -135,6 +145,7 @@
executeRequestTest(messageId, coordinationType, expires, coordinationContext) ;
}
+ @Test
public void testRequestWithExpiresWithCurrentContextWithExpires()
throws Exception
{
@@ -149,7 +160,7 @@
executeRequestTest(messageId, coordinationType, expires, coordinationContext) ;
}
-
+
private void executeRequestTest(final String messageId, final String coordinationType, final Long expires, final CoordinationContextType coordinationContext)
throws Exception
{
@@ -198,6 +209,7 @@
assertEquals(requestCreateCoordinationContext.getCoordinationType().getValue(), coordinationType);
}
+ @Test
public void testResponse()
throws Exception
{
@@ -243,6 +255,7 @@
assertFalse(callback.hasFailed()) ;
}
+ @Test
public void testError()
throws Exception
{
@@ -286,8 +299,9 @@
assertTrue(callback.hasTriggered()) ;
assertFalse(callback.hasFailed()) ;
}
-
- protected void tearDown()
+
+ @After
+ public void tearDown()
throws Exception
{
ActivationCoordinatorProcessor.setCoordinator(origActivationCoordinatorProcessor) ;
Modified: labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/junit/EnduranceTestCase.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/junit/EnduranceTestCase.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/junit/EnduranceTestCase.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -28,8 +28,12 @@
import javax.xml.namespace.QName;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
import com.arjuna.webservices.SoapFault;
import com.arjuna.webservices.SoapFaultType;
import com.arjuna.webservices.SoapRegistry;
@@ -58,7 +62,7 @@
import com.arjuna.wsc.tests.junit.TestActivationCoordinatorProcessor.CreateCoordinationContextDetails;
import com.arjuna.wsc.tests.junit.TestRegistrationCoordinatorProcessor.RegisterDetails;
-public class EnduranceTestCase extends TestCase
+public class EnduranceTestCase
{
private ActivationCoordinatorProcessor origActivationCoordinatorProcessor ;
private RegistrationCoordinatorProcessor origRegistrationCoordinatorProcessor ;
@@ -73,7 +77,8 @@
private static final long TEST_DURATION = 30 * 1000;
- protected void setUp()
+ @Before
+ public void setUp()
throws Exception
{
origActivationCoordinatorProcessor = ActivationCoordinatorProcessor.setCoordinator(testActivationCoordinatorProcessor) ;
@@ -90,6 +95,7 @@
registrationRequesterService = new EndpointReferenceType(new AttributedURIType(registrationRequesterServiceURI)) ;
}
+ @Test
public void testCreateCoordinationContextRequest()
throws Exception
{
@@ -103,6 +109,7 @@
}
}
+ @Test
public void testCreateCoordinationContextResponse()
throws Exception
{
@@ -116,6 +123,7 @@
}
}
+ @Test
public void testCreateCoordinationContextError()
throws Exception
{
@@ -129,6 +137,7 @@
}
}
+ @Test
public void testRegisterRequest()
throws Exception
{
@@ -142,6 +151,7 @@
}
}
+ @Test
public void testRegisterResponse()
throws Exception
{
@@ -155,6 +165,7 @@
}
}
+ @Test
public void testRegisterError()
throws Exception
{
@@ -168,6 +179,7 @@
}
}
+ @Test
public void testEachInTurn()
throws Exception
{
@@ -411,7 +423,8 @@
assertFalse(callback.hasFailed()) ;
}
- protected void tearDown()
+ @After
+ public void tearDown()
throws Exception
{
ActivationCoordinatorProcessor.setCoordinator(origActivationCoordinatorProcessor) ;
Modified: labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/junit/RegistrationServiceExceptionTestCase.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/junit/RegistrationServiceExceptionTestCase.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/junit/RegistrationServiceExceptionTestCase.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -26,7 +26,10 @@
package com.arjuna.wsc.tests.junit;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
import com.arjuna.webservices.SoapRegistry;
import com.arjuna.webservices.stax.URI;
@@ -41,12 +44,13 @@
import com.arjuna.wsc.RegistrationCoordinator;
import com.arjuna.wsc.tests.TestUtil;
-public class RegistrationServiceExceptionTestCase extends TestCase
+public class RegistrationServiceExceptionTestCase
{
private EndpointReferenceType registrationRequester ;
private EndpointReferenceType registrationCoordinator ;
-
- protected void setUp()
+
+ @Before
+ public void setUp()
throws Exception
{
final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
@@ -56,6 +60,7 @@
registrationCoordinator = new EndpointReferenceType(new AttributedURIType(registrationCoordinatorURI)) ;
}
+ @Test
public void testAlreadyRegisteredProtocolIdentifierException()
throws Exception
{
@@ -76,6 +81,7 @@
}
}
+ @Test
public void testInvalidProtocolProtocolIdentifierException()
throws Exception
{
@@ -96,6 +102,7 @@
}
}
+ @Test
public void testInvalidStateProtocolIdentifierException()
throws Exception
{
@@ -116,6 +123,7 @@
}
}
+ @Test
public void testNoActivityProtocolIdentifierException()
throws Exception
{
@@ -136,7 +144,8 @@
}
}
- protected void tearDown()
+ @After
+ public void tearDown()
throws Exception
{
registrationCoordinator = null ;
Modified: labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/junit/RegistrationServiceTestCase.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/junit/RegistrationServiceTestCase.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/junit/RegistrationServiceTestCase.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -26,7 +26,10 @@
package com.arjuna.wsc.tests.junit;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
import com.arjuna.webservices.SoapRegistry;
import com.arjuna.webservices.stax.URI;
@@ -38,12 +41,13 @@
import com.arjuna.wsc.RegistrationCoordinator;
import com.arjuna.wsc.tests.TestUtil;
-public class RegistrationServiceTestCase extends TestCase
+public class RegistrationServiceTestCase
{
private EndpointReferenceType registrationRequester ;
private EndpointReferenceType registrationCoordinator ;
-
- protected void setUp()
+
+ @Before
+ public void setUp()
throws Exception
{
final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
@@ -53,6 +57,7 @@
registrationCoordinator = new EndpointReferenceType(new AttributedURIType(registrationCoordinatorURI)) ;
}
+ @Test
public void testKnownCoordinationType()
throws Exception
{
@@ -74,7 +79,8 @@
fail("Unexpected exception: " + th) ;
}
}
-
+
+ @Test
public void testUnknownCoordinationType()
throws Exception
{
@@ -95,7 +101,8 @@
}
}
- protected void tearDown()
+ @After
+ public void tearDown()
throws Exception
{
registrationCoordinator = null ;
Modified: labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/junit/RegistrationTestCase.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/junit/RegistrationTestCase.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/junit/RegistrationTestCase.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -28,7 +28,10 @@
import javax.xml.namespace.QName;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
import com.arjuna.webservices.SoapFault;
import com.arjuna.webservices.SoapFaultType;
@@ -49,15 +52,16 @@
import com.arjuna.webservices.wscoor.processors.RegistrationRequesterProcessor;
import com.arjuna.wsc.tests.junit.TestRegistrationCoordinatorProcessor.RegisterDetails;
-public class RegistrationTestCase extends TestCase
+public class RegistrationTestCase
{
private RegistrationCoordinatorProcessor origRegistrationCoordinatorProcessor ;
private TestRegistrationCoordinatorProcessor testRegistrationCoordinatorProcessor = new TestRegistrationCoordinatorProcessor() ;
private EndpointReferenceType registrationCoordinatorService ;
private EndpointReferenceType registrationRequesterService ;
-
- protected void setUp()
+
+ @Before
+ public void setUp()
throws Exception
{
origRegistrationCoordinatorProcessor = RegistrationCoordinatorProcessor.setCoordinator(testRegistrationCoordinatorProcessor) ;
@@ -68,12 +72,14 @@
registrationRequesterService = new EndpointReferenceType(new AttributedURIType(registrationRequesterServiceURI)) ;
}
+ @Test
public void testRequestWithoutInstanceIdentifier()
throws Exception
{
executeRequest("testRequestWithoutInstanceIdentifier", null) ;
}
+ @Test
public void testRequestWithInstanceIdentifier()
throws Exception
{
@@ -123,6 +129,7 @@
requestRegister.getParticipantProtocolService().getAddress().getValue()) ;
}
+ @Test
public void testResponse()
throws Exception
{
@@ -162,6 +169,7 @@
assertFalse(callback.hasFailed()) ;
}
+ @Test
public void testError()
throws Exception
{
@@ -206,7 +214,8 @@
assertFalse(callback.hasFailed()) ;
}
- protected void tearDown()
+ @After
+ public void tearDown()
throws Exception
{
RegistrationCoordinatorProcessor.setCoordinator(origRegistrationCoordinatorProcessor) ;
Modified: labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/junit/TestSuite.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/junit/TestSuite.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/junit/TestSuite.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -26,19 +26,20 @@
package com.arjuna.wsc.tests.junit;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+ at RunWith(Suite.class)
+ at Suite.SuiteClasses({
+ com.arjuna.wsc.tests.junit.ActivationTestCase.class,
+ com.arjuna.wsc.tests.junit.RegistrationTestCase.class,
+ com.arjuna.wsc.tests.junit.ActivationServiceTestCase.class,
+ com.arjuna.wsc.tests.junit.ActivationServiceExceptionTestCase.class,
+ com.arjuna.wsc.tests.junit.RegistrationServiceTestCase.class,
+ com.arjuna.wsc.tests.junit.RegistrationServiceExceptionTestCase.class,
+ com.arjuna.wsc.tests.junit.EnduranceTestCase.class,
+ com.arjuna.wsc.tests.junit.ThreadedEnduranceTestCase.class
+})
public class TestSuite extends junit.framework.TestSuite
{
- public TestSuite()
- {
- addTest(new junit.framework.TestSuite(com.arjuna.wsc.tests.junit.ActivationTestCase.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wsc.tests.junit.RegistrationTestCase.class));
-
- addTest(new junit.framework.TestSuite(com.arjuna.wsc.tests.junit.ActivationServiceTestCase.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wsc.tests.junit.ActivationServiceExceptionTestCase.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wsc.tests.junit.RegistrationServiceTestCase.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wsc.tests.junit.RegistrationServiceExceptionTestCase.class));
-
- addTest(new junit.framework.TestSuite(com.arjuna.wsc.tests.junit.EnduranceTestCase.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wsc.tests.junit.ThreadedEnduranceTestCase.class));
- }
}
Modified: labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/junit/ThreadedEnduranceTestCase.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/junit/ThreadedEnduranceTestCase.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc/tests/junit/ThreadedEnduranceTestCase.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -30,7 +30,10 @@
import javax.xml.namespace.QName;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
import com.arjuna.webservices.SoapFault;
import com.arjuna.webservices.SoapFaultType;
@@ -51,7 +54,7 @@
import com.arjuna.webservices.wscoor.processors.RegistrationRequesterProcessor;
import com.arjuna.wsc.tests.TestUtil;
-public class ThreadedEnduranceTestCase extends TestCase
+public class ThreadedEnduranceTestCase
{
private EndpointReferenceType activationCoordinatorService ;
private EndpointReferenceType activationRequesterService ;
@@ -62,7 +65,8 @@
private static final long TEST_DURATION = 60 * 1000;
private static final int TEST_THREADS = 4;
- protected void setUp()
+ @Before
+ public void setUp()
throws Exception
{
final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
@@ -77,24 +81,28 @@
registrationRequesterService = new EndpointReferenceType(new AttributedURIType(registrationRequesterServiceURI)) ;
}
+ @Test
public void testCreateCoordinationContextResponse()
throws Exception
{
invoke(0);
}
+ @Test
public void testCreateCoordinationContextError()
throws Exception
{
invoke(1);
}
+ @Test
public void testRegisterResponse()
throws Exception
{
invoke(2);
}
+ @Test
public void testRegisterError()
throws Exception
{
@@ -357,7 +365,8 @@
assertFalse(callback.hasFailed()) ;
}
- protected void tearDown()
+ @After
+ public void tearDown()
throws Exception
{
activationCoordinatorService = null ;
Modified: labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/ActivationServiceExceptionTestCase.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/ActivationServiceExceptionTestCase.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/ActivationServiceExceptionTestCase.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -26,14 +26,17 @@
package com.arjuna.wsc11.tests.junit;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
import com.arjuna.wsc.InvalidCreateParametersException;
import com.arjuna.wsc.tests.TestUtil;
import com.arjuna.wsc11.ActivationCoordinator;
import com.arjuna.wsc11.tests.TestUtil11;
-import junit.framework.TestCase;
-public class ActivationServiceExceptionTestCase extends TestCase
+public class ActivationServiceExceptionTestCase
{
+ @Test
public void testInvalidCreateParametersException()
throws Exception
{
Modified: labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/ActivationServiceTestCase.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/ActivationServiceTestCase.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/ActivationServiceTestCase.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -26,15 +26,19 @@
package com.arjuna.wsc11.tests.junit;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
import com.arjuna.wsc.InvalidCreateParametersException;
import com.arjuna.wsc.tests.TestUtil;
import com.arjuna.wsc11.ActivationCoordinator;
import com.arjuna.wsc11.tests.TestUtil11;
-import junit.framework.TestCase;
+
import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
-public class ActivationServiceTestCase extends TestCase
+public class ActivationServiceTestCase
{
+ @Test
public void testKnownCoordinationType()
throws Exception
{
@@ -56,6 +60,7 @@
}
}
+ @Test
public void testUnknownCoordinationType()
throws Exception
{
Modified: labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/ActivationTestCase.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/ActivationTestCase.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/ActivationTestCase.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -26,6 +26,11 @@
package com.arjuna.wsc11.tests.junit;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
import com.arjuna.webservices11.ServiceRegistry;
import com.arjuna.webservices11.wsaddr.AddressingHelper;
import org.jboss.wsf.common.addressing.MAP;
@@ -34,24 +39,26 @@
import com.arjuna.wsc.tests.TestUtil;
import com.arjuna.wsc11.tests.TestUtil11;
import com.arjuna.wsc11.tests.junit.TestActivationCoordinatorProcessor.CreateCoordinationContextDetails;
-import junit.framework.TestCase;
+
import org.oasis_open.docs.ws_tx.wscoor._2006._06.*;
import javax.xml.ws.wsaddressing.W3CEndpointReference;
-public class ActivationTestCase extends TestCase
+public class ActivationTestCase
{
private ActivationCoordinatorProcessor origActivationCoordinatorProcessor ;
private TestActivationCoordinatorProcessor testActivationCoordinatorProcessor = new TestActivationCoordinatorProcessor() ;
- protected void setUp()
+ @Before
+ public void setUp()
throws Exception
{
origActivationCoordinatorProcessor = ActivationCoordinatorProcessor.setCoordinator(testActivationCoordinatorProcessor) ;
final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry() ;
}
+ @Test
public void testRequestWithoutExpiresWithoutCurrentContext()
throws Exception
{
@@ -63,6 +70,7 @@
executeRequestTest(messageId, coordinationType, expires, coordinationContext) ;
}
+ @Test
public void testRequestWithExpiresWithoutCurrentContext()
throws Exception
{
@@ -74,6 +82,7 @@
executeRequestTest(messageId, coordinationType, expires, coordinationContext) ;
}
+ @Test
public void testRequestWithoutExpiresWithCurrentContextWithoutExpires()
throws Exception
{
@@ -91,6 +100,7 @@
executeRequestTest(messageId, coordinationType, expires, coordinationContext) ;
}
+ @Test
public void testRequestWithoutExpiresWithCurrentContextWithExpires()
throws Exception
{
@@ -111,6 +121,7 @@
executeRequestTest(messageId, coordinationType, expires, coordinationContext) ;
}
+ @Test
public void testRequestWithExpiresWithCurrentContextWithoutExpires()
throws Exception
{
@@ -128,6 +139,7 @@
executeRequestTest(messageId, coordinationType, expires, coordinationContext) ;
}
+ @Test
public void testRequestWithExpiresWithCurrentContextWithExpires()
throws Exception
{
@@ -234,7 +246,8 @@
assertNotNull(outContext.getRegistrationService());
}
- protected void tearDown()
+ @After
+ public void tearDown()
throws Exception
{
ActivationCoordinatorProcessor.setCoordinator(origActivationCoordinatorProcessor) ;
Modified: labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/EnduranceTestCase.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/EnduranceTestCase.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/EnduranceTestCase.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -26,6 +26,11 @@
package com.arjuna.wsc11.tests.junit;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
import com.arjuna.webservices11.wsaddr.AddressingHelper;
import org.jboss.wsf.common.addressing.MAP;
import com.arjuna.webservices11.wsarj.ArjunaContext;
@@ -39,12 +44,12 @@
import com.arjuna.wsc11.tests.TestUtil11;
import com.arjuna.wsc11.tests.junit.TestActivationCoordinatorProcessor.CreateCoordinationContextDetails;
import com.arjuna.wsc11.tests.junit.TestRegistrationCoordinatorProcessor.RegisterDetails;
-import junit.framework.TestCase;
+
import org.oasis_open.docs.ws_tx.wscoor._2006._06.*;
import javax.xml.ws.wsaddressing.W3CEndpointReference;
-public class EnduranceTestCase extends TestCase
+public class EnduranceTestCase
{
private ActivationCoordinatorProcessor origActivationCoordinatorProcessor ;
private RegistrationCoordinatorProcessor origRegistrationCoordinatorProcessor ;
@@ -55,7 +60,8 @@
private static final long TEST_DURATION = 30 * 1000;
- protected void setUp()
+ @Before
+ public void setUp()
throws Exception
{
origActivationCoordinatorProcessor = ActivationCoordinatorProcessor.setCoordinator(testActivationCoordinatorProcessor) ;
@@ -63,6 +69,7 @@
origRegistrationCoordinatorProcessor = RegistrationCoordinatorProcessor.setCoordinator(testRegistrationCoordinatorProcessor) ;
}
+ @Test
public void testCreateCoordinationContextRequest()
throws Exception
{
@@ -76,6 +83,7 @@
}
}
+ @Test
public void testCreateCoordinationContextError()
throws Exception
{
@@ -89,6 +97,7 @@
}
}
+ @Test
public void testRegisterRequest()
throws Exception
{
@@ -102,6 +111,7 @@
}
}
+ @Test
public void testRegisterError()
throws Exception
{
@@ -115,6 +125,7 @@
}
}
+ @Test
public void testEachInTurn()
throws Exception
{
@@ -288,7 +299,8 @@
assertNotNull(protocolIdentifier, requestRegister.getParticipantProtocolService()) ;
}
- protected void tearDown()
+ @After
+ public void tearDown()
throws Exception
{
ActivationCoordinatorProcessor.setCoordinator(origActivationCoordinatorProcessor) ;
Modified: labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/RegistrationServiceExceptionTestCase.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/RegistrationServiceExceptionTestCase.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/RegistrationServiceExceptionTestCase.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -26,6 +26,9 @@
package com.arjuna.wsc11.tests.junit;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
import com.arjuna.wsc.AlreadyRegisteredException;
import com.arjuna.wsc.InvalidProtocolException;
import com.arjuna.wsc.InvalidStateException;
@@ -33,13 +36,14 @@
import com.arjuna.wsc.tests.TestUtil;
import com.arjuna.wsc11.RegistrationCoordinator;
import com.arjuna.wsc11.tests.TestUtil11;
-import junit.framework.TestCase;
+
import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
import javax.xml.ws.wsaddressing.W3CEndpointReference;
-public class RegistrationServiceExceptionTestCase extends TestCase
+public class RegistrationServiceExceptionTestCase
{
+ @Test
public void testAlreadyRegisteredProtocolIdentifierException()
throws Exception
{
@@ -63,6 +67,7 @@
}
}
+ @Test
public void testInvalidProtocolProtocolIdentifierException()
throws Exception
{
@@ -86,6 +91,7 @@
}
}
+ @Test
public void testInvalidStateProtocolIdentifierException()
throws Exception
{
@@ -109,6 +115,7 @@
}
}
+ @Test
public void testNoActivityProtocolIdentifierException()
throws Exception
{
Modified: labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/RegistrationServiceTestCase.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/RegistrationServiceTestCase.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/RegistrationServiceTestCase.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -26,6 +26,9 @@
package com.arjuna.wsc11.tests.junit;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
import com.arjuna.wsc.InvalidProtocolException;
import com.arjuna.wsc.tests.TestUtil;
import com.arjuna.wsc11.RegistrationCoordinator;
@@ -37,6 +40,7 @@
public class RegistrationServiceTestCase extends TestCase
{
+ @Test
public void testKnownCoordinationType()
throws Exception
{
@@ -61,6 +65,7 @@
}
}
+ @Test
public void testUnknownCoordinationType()
throws Exception
{
Modified: labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/RegistrationTestCase.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/RegistrationTestCase.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/RegistrationTestCase.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -26,6 +26,11 @@
package com.arjuna.wsc11.tests.junit;
+import org.junit.Before;
+import org.junit.After;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
import com.arjuna.webservices11.ServiceRegistry;
import org.jboss.wsf.common.addressing.MAP;
import com.arjuna.webservices11.wsarj.ArjunaContext;
@@ -35,32 +40,35 @@
import com.arjuna.webservices11.wscoor.processors.RegistrationCoordinatorProcessor;
import com.arjuna.wsc11.tests.TestUtil11;
import com.arjuna.wsc11.tests.junit.TestRegistrationCoordinatorProcessor.RegisterDetails;
-import junit.framework.TestCase;
+
import org.oasis_open.docs.ws_tx.wscoor._2006._06.RegisterResponseType;
import org.oasis_open.docs.ws_tx.wscoor._2006._06.RegisterType;
import org.oasis_open.docs.ws_tx.wscoor._2006._06.RegistrationPortType;
import javax.xml.ws.wsaddressing.W3CEndpointReference;
-public class RegistrationTestCase extends TestCase
+public class RegistrationTestCase
{
private RegistrationCoordinatorProcessor origRegistrationCoordinatorProcessor ;
private TestRegistrationCoordinatorProcessor testRegistrationCoordinatorProcessor = new TestRegistrationCoordinatorProcessor() ;
- protected void setUp()
+ @Before
+ public void setUp()
throws Exception
{
origRegistrationCoordinatorProcessor = RegistrationCoordinatorProcessor.setCoordinator(testRegistrationCoordinatorProcessor) ;
final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry() ;
}
+ @Test
public void testRequestWithoutInstanceIdentifier()
throws Exception
{
executeRequest("testRequestWithoutInstanceIdentifier", null) ;
}
+ @Test
public void testRequestWithInstanceIdentifier()
throws Exception
{
@@ -102,7 +110,8 @@
assertEquals(protocolIdentifier, requestRegister.getProtocolIdentifier()) ;
}
- protected void tearDown()
+ @After
+ public void tearDown()
throws Exception
{
RegistrationCoordinatorProcessor.setCoordinator(origRegistrationCoordinatorProcessor) ;
Modified: labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/TestSuite.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/TestSuite.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/wsc11/tests/junit/TestSuite.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -26,20 +26,19 @@
package com.arjuna.wsc11.tests.junit;
-public class TestSuite extends junit.framework.TestSuite
-{
- public TestSuite()
- {
- addTest(new junit.framework.TestSuite(com.arjuna.wsc11.tests.junit.ActivationTestCase.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wsc11.tests.junit.RegistrationTestCase.class));
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
- addTest(new junit.framework.TestSuite(com.arjuna.wsc11.tests.junit.ActivationServiceTestCase.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wsc11.tests.junit.ActivationServiceExceptionTestCase.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wsc11.tests.junit.RegistrationServiceTestCase.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wsc11.tests.junit.RegistrationServiceExceptionTestCase.class));
-
- addTest(new junit.framework.TestSuite(com.arjuna.wsc11.tests.junit.EnduranceTestCase.class));
- // this needs redesigning because 1.1. protocols are RPC pattern
- //addTest(new junit.framework.TestSuite(com.arjuna.wsc11.tests.junit.ThreadedEnduranceTestCase.class));
- }
+ at RunWith(Suite.class)
+ at Suite.SuiteClasses({
+ com.arjuna.wsc11.tests.junit.ActivationTestCase.class,
+ com.arjuna.wsc11.tests.junit.RegistrationTestCase.class,
+ com.arjuna.wsc11.tests.junit.ActivationServiceTestCase.class,
+ com.arjuna.wsc11.tests.junit.ActivationServiceExceptionTestCase.class,
+ com.arjuna.wsc11.tests.junit.RegistrationServiceTestCase.class,
+ com.arjuna.wsc11.tests.junit.RegistrationServiceExceptionTestCase.class,
+ com.arjuna.wsc11.tests.junit.EnduranceTestCase.class
+})
+public class TestSuite
+{
}
\ No newline at end of file
Modified: labs/jbosstm/trunk/XTS/WS-T/build.xml
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/build.xml 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-T/build.xml 2010-03-01 16:40:31 UTC (rev 31894)
@@ -85,6 +85,7 @@
<property name="ws-c.build.dev.lib.dir" value="../WS-C//build/dev/lib"/>
<property name="wscf.build.lib.dir" value="../WSCF//build/lib"/>
<property name="wsas.build.lib.dir" value="../WSAS//build/lib"/>
+ <property name="wsas.tests.build.lib.dir" value="../WSAS/tests/build/lib"/>
<property name="ws-c.libs" value="ws-c.jar"/>
<property name="ws-c.api.libs" value="ws-c-api.jar"/>
@@ -371,7 +372,7 @@
<target name="tests-webapps" depends="tests-compile">
<jar jarfile="${build.tests.lib.dir}/ws-t-tests.jar">
- <fileset dir="${build.tests.classes.dir}"/>
+ <fileset dir="${build.tests.classes.dir}" excludes="com/arjuna/qa/junit/*.class"/>
</jar>
<copy file="${tests.dd.dir}/ws-t-tests_web-app.xml" tofile="${build.tests.dd.dir}/web-app.xml">
</copy>
@@ -382,19 +383,10 @@
<war warfile="${build.tests.webapps.dir}/ws-t11-tests.war" webxml="${build.tests.dd.dir}/web-app11.xml">
</war>
<ear earfile="${build.tests.webapps.dir}/ws-t-tests.ear" appxml="${tests.dd.dir}/ws-t-tests_application.xml">
- <!--
- <fileset dir="${com.arjuna.jta.install.ext}" includes="${jta.ext.jars}"/>
- -->
<fileset dir="${xts.ext.dir}" includes="${tests.libs}"/>
- <!--
- <fileset dir="${com.arjuna.jta.install.lib}" includes="${jta.lib.jars}"/>
- <fileset dir="${build.dev.lib.dir}" includes="ws-t.jar ws-t10.jar"/>
- -->
<fileset dir="${build.tests.webapps.dir}" includes="ws-t-tests.war ws-t11-tests.war"/>
<fileset dir="${build.tests.lib.dir}" includes="ws-t-tests.jar"/>
- <!--
- <fileset dir="${ws-c.build.dev.lib.dir}" includes="${ws-c.libs} ${ws-c10.libs}"/>
- -->
+ <fileset dir="${wsas.tests.build.lib.dir}" includes="xts-test-servlet.jar"/>
</ear>
</target>
@@ -410,6 +402,7 @@
<fileset dir="${xts.ext.dir}" includes="${tests.libs}"/>
<fileset dir="${build.tests.webapps.dir}" includes="ws-t11-tests.war"/>
<fileset dir="${build.tests.lib.dir}" includes="ws-t-tests.jar"/>
+ <fileset dir="${wsas.tests.build.lib.dir}" includes="xts-test-servlet.jar"/>
</ear>
</target>
Modified: labs/jbosstm/trunk/XTS/WS-T/tests/dd/ws-t-tests_application.xml
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/tests/dd/ws-t-tests_application.xml 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-T/tests/dd/ws-t-tests_application.xml 2010-03-01 16:40:31 UTC (rev 31894)
@@ -42,10 +42,14 @@
</module>
<module>
- <java>junit.jar</java>
+ <java>ws-t-tests.jar</java>
</module>
-
+
<module>
- <java>ws-t-tests.jar</java>
+ <java>xts-test-servlet.jar</java>
</module>
+
+ <module>
+ <java>junit.jar</java>
+ </module>
</application>
Modified: labs/jbosstm/trunk/XTS/WS-T/tests/dd/ws-t-tests_web-app.xml
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/tests/dd/ws-t-tests_web-app.xml 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-T/tests/dd/ws-t-tests_web-app.xml 2010-03-01 16:40:31 UTC (rev 31894)
@@ -34,7 +34,7 @@
<servlet>
<servlet-name>JUnitTestsServlet</servlet-name>
- <servlet-class>com.arjuna.qa.junit.WSTTestRunnerServlet</servlet-class>
+ <servlet-class>com.arjuna.qa.junit.TestRunnerServlet</servlet-class>
<init-param>
<param-name>TestSuiteClassName</param-name>
<param-value>com.arjuna.wst.tests.junit.TestSuite</param-value>
@@ -44,7 +44,7 @@
<servlet>
<servlet-name>JUnitTestsXMLServlet</servlet-name>
- <servlet-class>com.arjuna.qa.junit.WSTTestRunnerXMLServlet</servlet-class>
+ <servlet-class>com.arjuna.qa.junit.TestRunnerXMLServlet</servlet-class>
<init-param>
<param-name>TestSuiteClassName</param-name>
<param-value>com.arjuna.wst.tests.junit.TestSuite</param-value>
Modified: labs/jbosstm/trunk/XTS/WS-T/tests/dd/ws-t11-tests_application.xml
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/tests/dd/ws-t11-tests_application.xml 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-T/tests/dd/ws-t11-tests_application.xml 2010-03-01 16:40:31 UTC (rev 31894)
@@ -35,10 +35,14 @@
</module>
<module>
- <java>junit.jar</java>
+ <java>ws-t-tests.jar</java>
</module>
-
+
<module>
- <java>ws-t-tests.jar</java>
+ <java>xts-test-servlet.jar</java>
</module>
+
+ <module>
+ <java>junit.jar</java>
+ </module>
</application>
Modified: labs/jbosstm/trunk/XTS/WS-T/tests/dd/ws-t11-tests_web-app.xml
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/tests/dd/ws-t11-tests_web-app.xml 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-T/tests/dd/ws-t11-tests_web-app.xml 2010-03-01 16:40:31 UTC (rev 31894)
@@ -34,7 +34,7 @@
<servlet>
<servlet-name>JUnitTestsServlet</servlet-name>
- <servlet-class>com.arjuna.qa.junit.WSTTestRunnerServlet</servlet-class>
+ <servlet-class>com.arjuna.qa.junit.TestRunnerServlet</servlet-class>
<init-param>
<param-name>TestSuiteClassName</param-name>
<param-value>com.arjuna.wst11.tests.junit.TestSuite</param-value>
@@ -44,7 +44,7 @@
<servlet>
<servlet-name>JUnitTestsXMLServlet</servlet-name>
- <servlet-class>com.arjuna.qa.junit.WSTTestRunnerXMLServlet</servlet-class>
+ <servlet-class>com.arjuna.qa.junit.TestRunnerXMLServlet</servlet-class>
<init-param>
<param-name>TestSuiteClassName</param-name>
<param-value>com.arjuna.wst11.tests.junit.TestSuite</param-value>
Modified: labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/BusinessActivityTerminatorServiceTestCase.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/BusinessActivityTerminatorServiceTestCase.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/BusinessActivityTerminatorServiceTestCase.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -26,7 +26,10 @@
package com.arjuna.wst.tests.junit;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
import com.arjuna.webservices.SoapRegistry;
import com.arjuna.webservices.wsaddr.AttributedURIType;
@@ -39,9 +42,10 @@
import com.arjuna.wst.stub.BusinessActivityTerminatorStub;
import com.arjuna.wst.tests.TestUtil;
-public class BusinessActivityTerminatorServiceTestCase extends TestCase
+public class BusinessActivityTerminatorServiceTestCase
{
- protected void setUp()
+ @Before
+ public void setUp()
throws Exception
{
final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
@@ -65,24 +69,28 @@
_unknownTransactionExceptionBusinessActivityTerminatorStub = new BusinessActivityTerminatorStub("businessActivityTerminatorCoordinator", unknownTransactionExceptionBusinessActivityTerminatorCoordinator);
}
+ @Test
public void testCloseWithNoException()
throws Exception
{
_noExceptionBusinessActivityTerminatorStub.close();
}
+ @Test
public void testCancelWithNoException()
throws Exception
{
_noExceptionBusinessActivityTerminatorStub.cancel();
}
+ @Test
public void testCompleteWithNoException()
throws Exception
{
_noExceptionBusinessActivityTerminatorStub.complete();
}
+ @Test
public void testCloseWithUnknownTransactionException()
throws Exception
{
@@ -96,6 +104,7 @@
}
}
+ @Test
public void testCancelWithUnknownTransactionException()
throws Exception
{
@@ -109,6 +118,7 @@
}
}
+ @Test
public void testCompleteWithUnknownTransactionException()
throws Exception
{
@@ -122,6 +132,7 @@
}
}
+ @Test
public void testCloseWithTransactionRolledBackException()
throws Exception
{
@@ -135,6 +146,7 @@
}
}
+ @Test
public void testCloseWithSystemException()
throws Exception
{
@@ -148,6 +160,7 @@
}
}
+ @Test
public void testCancelWithSystemException()
throws Exception
{
@@ -161,6 +174,7 @@
}
}
+ @Test
public void testCompleteWithSystemException()
throws Exception
{
@@ -174,7 +188,8 @@
}
}
- protected void tearDown()
+ @After
+ public void tearDown()
throws Exception
{
_noExceptionBusinessActivityTerminatorStub = null;
Modified: labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/BusinessAgreementWithCoordinatorCompletionCoordinatorTestCase.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/BusinessAgreementWithCoordinatorCompletionCoordinatorTestCase.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/BusinessAgreementWithCoordinatorCompletionCoordinatorTestCase.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -28,7 +28,10 @@
import javax.xml.namespace.QName;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
import com.arjuna.webservices.SoapFault;
import com.arjuna.webservices.SoapFaultType;
@@ -47,14 +50,15 @@
import com.arjuna.webservices.wsba.processors.CoordinatorCompletionParticipantProcessor;
import com.arjuna.wst.tests.junit.TestCoordinatorCompletionParticipantProcessor.CoordinatorCompletionParticipantDetails;
-public class BusinessAgreementWithCoordinatorCompletionCoordinatorTestCase extends TestCase
+public class BusinessAgreementWithCoordinatorCompletionCoordinatorTestCase
{
private CoordinatorCompletionParticipantProcessor origCoordinatorCompletionParticipantProcessor ;
private TestCoordinatorCompletionParticipantProcessor testCoordinatorCompletionParticipantProcessor = new TestCoordinatorCompletionParticipantProcessor() ;
private String coordinatorCompletionParticipantServiceURI ;
private String coordinatorCompletionCoordinatorServiceURI ;
- protected void setUp()
+ @Before
+ public void setUp()
throws Exception
{
origCoordinatorCompletionParticipantProcessor = CoordinatorCompletionParticipantProcessor.setProcessor(testCoordinatorCompletionParticipantProcessor) ;
@@ -63,6 +67,7 @@
coordinatorCompletionCoordinatorServiceURI = soapRegistry.getServiceURI(BusinessActivityConstants.SERVICE_COORDINATOR_COMPLETION_COORDINATOR) ;
}
+ @Test
public void testSendClose()
throws Exception
{
@@ -82,6 +87,7 @@
checkDetails(details, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendCancel()
throws Exception
{
@@ -101,6 +107,7 @@
checkDetails(details, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendCompensate()
throws Exception
{
@@ -120,6 +127,7 @@
checkDetails(details, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendFaulted()
throws Exception
{
@@ -139,6 +147,7 @@
checkDetails(details, false, messageId, instanceIdentifier);
}
+ @Test
public void testSendExited()
throws Exception
{
@@ -158,6 +167,7 @@
checkDetails(details, false, messageId, instanceIdentifier);
}
+ @Test
public void testSendStatus()
throws Exception
{
@@ -180,6 +190,7 @@
checkDetails(details, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendComplete()
throws Exception
{
@@ -199,6 +210,7 @@
checkDetails(details, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendGetStatus()
throws Exception
{
@@ -221,6 +233,7 @@
/*
* cannot test this any longer as client does not provide API to send soap fault
+ @Test
public void testSendError()
throws Exception
{
@@ -245,7 +258,8 @@
}
*/
- protected void tearDown()
+ @After
+ public void tearDown()
throws Exception
{
CoordinatorCompletionParticipantProcessor.setProcessor(origCoordinatorCompletionParticipantProcessor) ;
Modified: labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/BusinessAgreementWithCoordinatorCompletionParticipantTestCase.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/BusinessAgreementWithCoordinatorCompletionParticipantTestCase.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/BusinessAgreementWithCoordinatorCompletionParticipantTestCase.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -28,7 +28,10 @@
import javax.xml.namespace.QName;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
import com.arjuna.webservices.SoapFault;
import com.arjuna.webservices.SoapFaultType;
@@ -48,14 +51,15 @@
import com.arjuna.webservices.wsba.processors.CoordinatorCompletionCoordinatorProcessor;
import com.arjuna.wst.tests.junit.TestCoordinatorCompletionCoordinatorProcessor.CoordinatorCompletionCoordinatorDetails;
-public class BusinessAgreementWithCoordinatorCompletionParticipantTestCase extends TestCase
+public class BusinessAgreementWithCoordinatorCompletionParticipantTestCase
{
private CoordinatorCompletionCoordinatorProcessor origCoordinatorCompletionCoordinatorProcessor ;
private TestCoordinatorCompletionCoordinatorProcessor testCoordinatorCompletionCoordinatorProcessor = new TestCoordinatorCompletionCoordinatorProcessor() ;
private String coordinatorCompletionCoordinatorServiceURI ;
private String coordinatorCompletionParticipantServiceURI ;
- protected void setUp()
+ @Before
+ public void setUp()
throws Exception
{
origCoordinatorCompletionCoordinatorProcessor = CoordinatorCompletionCoordinatorProcessor.setProcessor(testCoordinatorCompletionCoordinatorProcessor) ;
@@ -64,6 +68,7 @@
coordinatorCompletionParticipantServiceURI = soapRegistry.getServiceURI(BusinessActivityConstants.SERVICE_COORDINATOR_COMPLETION_PARTICIPANT) ;
}
+ @Test
public void testSendClosed()
throws Exception
{
@@ -83,6 +88,7 @@
checkDetails(details, false, messageId, instanceIdentifier);
}
+ @Test
public void testSendCancelled()
throws Exception
{
@@ -102,6 +108,7 @@
checkDetails(details, false, messageId, instanceIdentifier);
}
+ @Test
public void testSendCompensated()
throws Exception
{
@@ -121,6 +128,7 @@
checkDetails(details, false, messageId, instanceIdentifier);
}
+ @Test
public void testSendFault()
throws Exception
{
@@ -143,6 +151,7 @@
checkDetails(details, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendCompleted()
throws Exception
{
@@ -162,6 +171,7 @@
checkDetails(details, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendStatus()
throws Exception
{
@@ -211,6 +221,7 @@
}
*/
+ @Test
public void testSendExit()
throws Exception
{
@@ -229,7 +240,8 @@
checkDetails(details, true, messageId, instanceIdentifier);
}
-
+
+ @Test
public void testSendGetStatus()
throws Exception
{
@@ -249,7 +261,8 @@
checkDetails(details, true, messageId, instanceIdentifier);
}
- protected void tearDown()
+ @After
+ public void tearDown()
throws Exception
{
CoordinatorCompletionCoordinatorProcessor.setProcessor(origCoordinatorCompletionCoordinatorProcessor) ;
Modified: labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/BusinessAgreementWithCoordinatorCompletionServiceTestCase.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/BusinessAgreementWithCoordinatorCompletionServiceTestCase.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/BusinessAgreementWithCoordinatorCompletionServiceTestCase.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -26,7 +26,10 @@
package com.arjuna.wst.tests.junit;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
import com.arjuna.webservices.SoapRegistry;
import com.arjuna.webservices.wsaddr.AttributedURIType;
@@ -41,9 +44,10 @@
import com.arjuna.wst.stub.BusinessAgreementWithCoordinatorCompletionStub;
import com.arjuna.wst.tests.TestUtil;
-public class BusinessAgreementWithCoordinatorCompletionServiceTestCase extends TestCase
+public class BusinessAgreementWithCoordinatorCompletionServiceTestCase
{
- protected void setUp()
+ @Before
+ public void setUp()
throws Exception
{
final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
@@ -82,24 +86,28 @@
= new BusinessAgreementWithCoordinatorCompletionStub(_faultedExceptionBusinessAgreementWithCoordinatorCompletionEngine);
}
+ @Test
public void testCloseWithNoException()
throws Exception
{
_noExceptionBusinessAgreementWithCoordinatorCompletionStub.close();
}
+ @Test
public void testCancelWithNoException()
throws Exception
{
_noExceptionBusinessAgreementWithCoordinatorCompletionStub.cancel();
}
+ @Test
public void testCompensateWithNoException()
throws Exception
{
_noExceptionBusinessAgreementWithCoordinatorCompletionStub.compensate();
}
+ @Test
public void testCloseWithWrongStateException()
throws Exception
{
@@ -113,6 +121,7 @@
}
}
+ @Test
public void testCancelWithWrongStateException()
throws Exception
{
@@ -126,6 +135,7 @@
}
}
+ @Test
public void testCompensateWithWrongStateException()
throws Exception
{
@@ -139,6 +149,7 @@
}
}
+ @Test
public void testCloseWithSystemException()
throws Exception
{
@@ -152,6 +163,7 @@
}
}
+ @Test
public void testCancelWithSystemException()
throws Exception
{
@@ -165,6 +177,7 @@
}
}
+ @Test
public void testCompensateWithSystemException()
throws Exception
{
@@ -178,6 +191,7 @@
}
}
+ @Test
public void testCompensateWithFaultedException ()
throws Exception
{
@@ -191,7 +205,8 @@
}
}
- protected void tearDown()
+ @After
+ public void tearDown()
throws Exception
{
_noExceptionBusinessAgreementWithCoordinatorCompletionStub = null;
Modified: labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/BusinessAgreementWithParticipantCompletionCoordinatorTestCase.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/BusinessAgreementWithParticipantCompletionCoordinatorTestCase.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/BusinessAgreementWithParticipantCompletionCoordinatorTestCase.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -28,7 +28,10 @@
import javax.xml.namespace.QName;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
import com.arjuna.webservices.SoapFault;
import com.arjuna.webservices.SoapFaultType;
@@ -47,14 +50,15 @@
import com.arjuna.webservices.wsba.processors.ParticipantCompletionParticipantProcessor;
import com.arjuna.wst.tests.junit.TestParticipantCompletionParticipantProcessor.ParticipantCompletionParticipantDetails;
-public class BusinessAgreementWithParticipantCompletionCoordinatorTestCase extends TestCase
+public class BusinessAgreementWithParticipantCompletionCoordinatorTestCase
{
private ParticipantCompletionParticipantProcessor origParticipantCompletionParticipantProcessor ;
private TestParticipantCompletionParticipantProcessor testParticipantCompletionParticipantProcessor = new TestParticipantCompletionParticipantProcessor() ;
private String participantCompletionParticipantServiceURI ;
private String participantCompletionCoordinatorServiceURI ;
- protected void setUp()
+ @Before
+ public void setUp()
throws Exception
{
origParticipantCompletionParticipantProcessor = ParticipantCompletionParticipantProcessor.setProcessor(testParticipantCompletionParticipantProcessor) ;
@@ -63,6 +67,7 @@
participantCompletionCoordinatorServiceURI = soapRegistry.getServiceURI(BusinessActivityConstants.SERVICE_PARTICIPANT_COMPLETION_COORDINATOR) ;
}
+ @Test
public void testSendClose()
throws Exception
{
@@ -82,6 +87,7 @@
checkDetails(details, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendCancel()
throws Exception
{
@@ -101,6 +107,7 @@
checkDetails(details, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendCompensate()
throws Exception
{
@@ -120,6 +127,7 @@
checkDetails(details, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendFaulted()
throws Exception
{
@@ -139,6 +147,7 @@
checkDetails(details, false, messageId, instanceIdentifier);
}
+ @Test
public void testSendExited()
throws Exception
{
@@ -158,6 +167,7 @@
checkDetails(details, false, messageId, instanceIdentifier);
}
+ @Test
public void testSendStatus()
throws Exception
{
@@ -179,7 +189,8 @@
checkDetails(details, true, messageId, instanceIdentifier);
}
-
+
+ @Test
public void testSendGetStatus()
throws Exception
{
@@ -224,7 +235,8 @@
checkDetails(details, false, messageId, instanceIdentifier);
}
*/
- protected void tearDown()
+ @After
+ public void tearDown()
throws Exception
{
ParticipantCompletionParticipantProcessor.setProcessor(origParticipantCompletionParticipantProcessor) ;
Modified: labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/BusinessAgreementWithParticipantCompletionParticipantTestCase.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/BusinessAgreementWithParticipantCompletionParticipantTestCase.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/BusinessAgreementWithParticipantCompletionParticipantTestCase.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -28,7 +28,10 @@
import javax.xml.namespace.QName;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
import com.arjuna.webservices.SoapFault;
import com.arjuna.webservices.SoapFaultType;
@@ -48,14 +51,15 @@
import com.arjuna.webservices.wsba.processors.ParticipantCompletionCoordinatorProcessor;
import com.arjuna.wst.tests.junit.TestParticipantCompletionCoordinatorProcessor.ParticipantCompletionCoordinatorDetails;
-public class BusinessAgreementWithParticipantCompletionParticipantTestCase extends TestCase
+public class BusinessAgreementWithParticipantCompletionParticipantTestCase
{
private ParticipantCompletionCoordinatorProcessor origParticipantCompletionCoordinatorProcessor ;
private TestParticipantCompletionCoordinatorProcessor testParticipantCompletionCoordinatorProcessor = new TestParticipantCompletionCoordinatorProcessor() ;
private String participantCompletionCoordinatorServiceURI ;
private String participantCompletionParticipantServiceURI ;
- protected void setUp()
+ @Before
+ public void setUp()
throws Exception
{
origParticipantCompletionCoordinatorProcessor = ParticipantCompletionCoordinatorProcessor.setProcessor(testParticipantCompletionCoordinatorProcessor) ;
@@ -64,6 +68,7 @@
participantCompletionParticipantServiceURI = soapRegistry.getServiceURI(BusinessActivityConstants.SERVICE_PARTICIPANT_COMPLETION_PARTICIPANT) ;
}
+ @Test
public void testSendClosed()
throws Exception
{
@@ -83,6 +88,7 @@
checkDetails(details, false, messageId, instanceIdentifier);
}
+ @Test
public void testSendCancelled()
throws Exception
{
@@ -102,6 +108,7 @@
checkDetails(details, false, messageId, instanceIdentifier);
}
+ @Test
public void testSendCompensated()
throws Exception
{
@@ -121,6 +128,7 @@
checkDetails(details, false, messageId, instanceIdentifier);
}
+ @Test
public void testSendCompleted()
throws Exception
{
@@ -140,6 +148,7 @@
checkDetails(details, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendStatus()
throws Exception
{
@@ -188,7 +197,8 @@
checkDetails(details, false, messageId, instanceIdentifier);
}
*/
-
+
+ @Test
public void testSendExit()
throws Exception
{
@@ -208,6 +218,7 @@
checkDetails(details, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendFault()
throws Exception
{
@@ -230,6 +241,7 @@
checkDetails(details, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendGetStatus()
throws Exception
{
@@ -249,7 +261,8 @@
checkDetails(details, true, messageId, instanceIdentifier);
}
- protected void tearDown()
+ @After
+ public void tearDown()
throws Exception
{
ParticipantCompletionCoordinatorProcessor.setProcessor(origParticipantCompletionCoordinatorProcessor) ;
Modified: labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/BusinessAgreementWithParticipantCompletionServiceTestCase.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/BusinessAgreementWithParticipantCompletionServiceTestCase.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/BusinessAgreementWithParticipantCompletionServiceTestCase.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -26,7 +26,10 @@
package com.arjuna.wst.tests.junit;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
import com.arjuna.webservices.SoapRegistry;
import com.arjuna.webservices.wsaddr.AttributedURIType;
@@ -41,9 +44,10 @@
import com.arjuna.wst.stub.BusinessAgreementWithParticipantCompletionStub;
import com.arjuna.wst.tests.TestUtil;
-public class BusinessAgreementWithParticipantCompletionServiceTestCase extends TestCase
+public class BusinessAgreementWithParticipantCompletionServiceTestCase
{
- protected void setUp()
+ @Before
+ public void setUp()
throws Exception
{
final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
@@ -83,24 +87,28 @@
= new BusinessAgreementWithParticipantCompletionStub(_faultedExceptionBusinessAgreementWithParticipantCompletionEngine);
}
+ @Test
public void testCloseWithNoException()
throws Exception
{
_noExceptionBusinessAgreementWithParticipantCompletionStub.close();
}
+ @Test
public void testCancelWithNoException()
throws Exception
{
_noExceptionBusinessAgreementWithParticipantCompletionStub.cancel();
}
+ @Test
public void testCompensateWithNoException()
throws Exception
{
_noExceptionBusinessAgreementWithParticipantCompletionStub.compensate();
}
+ @Test
public void testCloseWithWrongStateException()
throws Exception
{
@@ -114,6 +122,7 @@
}
}
+ @Test
public void testCancelWithWrongStateException()
throws Exception
{
@@ -127,6 +136,7 @@
}
}
+ @Test
public void testCompensateWithWrongStateException()
throws Exception
{
@@ -140,6 +150,7 @@
}
}
+ @Test
public void testCloseWithSystemException()
throws Exception
{
@@ -153,6 +164,7 @@
}
}
+ @Test
public void testCancelWithSystemException()
throws Exception
{
@@ -166,6 +178,7 @@
}
}
+ @Test
public void testCompensateWithSystemException()
throws Exception
{
@@ -179,6 +192,7 @@
}
}
+ @Test
public void testCompensateWithFaultedException ()
throws Exception
{
@@ -192,7 +206,8 @@
}
}
- protected void tearDown()
+ @After
+ public void tearDown()
throws Exception
{
_noExceptionBusinessAgreementWithParticipantCompletionStub = null;
Modified: labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/CompletionCoordinatorTestCase.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/CompletionCoordinatorTestCase.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/CompletionCoordinatorTestCase.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -28,7 +28,10 @@
import javax.xml.namespace.QName;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
import com.arjuna.webservices.SoapFault;
import com.arjuna.webservices.SoapFaultType;
@@ -45,9 +48,10 @@
import com.arjuna.webservices.wsat.client.CompletionInitiatorClient;
import com.arjuna.webservices.wsat.processors.CompletionInitiatorProcessor;
-public class CompletionCoordinatorTestCase extends TestCase
+public class CompletionCoordinatorTestCase
{
- protected void setUp()
+ @Before
+ public void setUp()
throws Exception
{
final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
@@ -55,6 +59,7 @@
completionCoordinatorServiceURI = soapRegistry.getServiceURI(AtomicTransactionConstants.SERVICE_COMPLETION_COORDINATOR) ;
}
+ @Test
public void testSendCommitted()
throws Exception
{
@@ -93,6 +98,7 @@
assertFalse(callback.hasFailed()) ;
}
+ @Test
public void testSendAborted()
throws Exception
{
@@ -131,6 +137,7 @@
assertFalse(callback.hasFailed()) ;
}
+ @Test
public void testSendError()
throws Exception
{
@@ -179,7 +186,8 @@
assertFalse(callback.hasFailed()) ;
}
- protected void tearDown()
+ @After
+ public void tearDown()
throws Exception
{
}
Modified: labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/CompletionParticipantTestCase.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/CompletionParticipantTestCase.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/CompletionParticipantTestCase.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -26,7 +26,10 @@
package com.arjuna.wst.tests.junit;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
import com.arjuna.webservices.SoapRegistry;
import com.arjuna.webservices.wsaddr.AddressingContext;
@@ -36,14 +39,15 @@
import com.arjuna.webservices.wsat.processors.CompletionCoordinatorProcessor;
import com.arjuna.wst.tests.junit.TestCompletionCoordinatorProcessor.CompletionCoordinatorDetails;
-public class CompletionParticipantTestCase extends TestCase
+public class CompletionParticipantTestCase
{
private CompletionCoordinatorProcessor origCompletionCoordinatorProcessor ;
private TestCompletionCoordinatorProcessor testCompletionCoordinatorProcessor = new TestCompletionCoordinatorProcessor() ;
private String completionCoordinatorService ;
- protected void setUp()
+ @Before
+ public void setUp()
throws Exception
{
origCompletionCoordinatorProcessor = CompletionCoordinatorProcessor.setProcessor(testCompletionCoordinatorProcessor) ;
@@ -51,6 +55,7 @@
completionCoordinatorService = soapRegistry.getServiceURI(AtomicTransactionConstants.SERVICE_COMPLETION_COORDINATOR) ;
}
+ @Test
public void testSendCommit()
throws Exception
{
@@ -64,6 +69,7 @@
assertTrue(details.hasCommit()) ;
}
+ @Test
public void testSendRollback()
throws Exception
{
@@ -77,7 +83,8 @@
assertTrue(details.hasRollback()) ;
}
- protected void tearDown()
+ @After
+ public void tearDown()
throws Exception
{
CompletionCoordinatorProcessor.setProcessor(origCompletionCoordinatorProcessor) ;
Modified: labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/CompletionServiceTestCase.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/CompletionServiceTestCase.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/CompletionServiceTestCase.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -26,7 +26,10 @@
package com.arjuna.wst.tests.junit;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
import com.arjuna.webservices.SoapRegistry;
import com.arjuna.webservices.wsaddr.AttributedURIType;
@@ -40,9 +43,10 @@
import com.arjuna.wst.stub.CompletionStub;
import com.arjuna.wst.tests.TestUtil;
-public class CompletionServiceTestCase extends TestCase
+public class CompletionServiceTestCase
{
- protected void setUp()
+ @Before
+ public void setUp()
throws Exception
{
final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
@@ -70,18 +74,21 @@
_nonexistentCompletionStub = new CompletionStub("completionParticipant", nonexistentCompletionCoordinator);
}
+ @Test
public void testCommitWithNoException()
throws Exception
{
_noExceptionCompletionStub.commit();
}
+ @Test
public void testRollbackWithNoException()
throws Exception
{
_noExceptionCompletionStub.rollback();
}
+ @Test
public void testCommitWithTransactionRolledBackException()
throws Exception
{
@@ -95,6 +102,7 @@
}
}
+ @Test
public void testCommitWithUnknownTransactionException()
throws Exception
{
@@ -108,6 +116,7 @@
}
}
+ @Test
public void testRollbackWithUnknownTransactionException()
throws Exception
{
@@ -121,6 +130,7 @@
}
}
+ @Test
public void testCommitWithSystemException()
throws Exception
{
@@ -134,6 +144,7 @@
}
}
+ @Test
public void testRollbackWithSystemException()
throws Exception
{
@@ -147,6 +158,7 @@
}
}
+ @Test
public void testCommitWithNonExistent()
throws Exception
{
@@ -160,6 +172,7 @@
}
}
+ @Test
public void testRollbackWithNonExistent()
throws Exception
{
@@ -173,7 +186,8 @@
}
}
- protected void tearDown()
+ @After
+ public void tearDown()
throws Exception
{
_noExceptionCompletionStub = null;
Modified: labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/TestSuite.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/TestSuite.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/TestSuite.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -26,28 +26,21 @@
package com.arjuna.wst.tests.junit;
-public class TestSuite extends junit.framework.TestSuite
-{
- public TestSuite()
- {
- // the service tests are no longer working
- addTest(new junit.framework.TestSuite(CompletionParticipantTestCase.class));
- addTest(new junit.framework.TestSuite(CompletionCoordinatorTestCase.class));
- addTest(new junit.framework.TestSuite(TwoPCParticipantTestCase.class));
- addTest(new junit.framework.TestSuite(TwoPCCoordinatorTestCase.class));
- addTest(new junit.framework.TestSuite(CompletionServiceTestCase.class));
- //addTest(new junit.framework.TestSuite(TwoPCServiceTestCase.class));
- //addTest(new junit.framework.TestSuite(BusinessAgreementWithParticipantCompletionServiceTestCase.class));
- addTest(new junit.framework.TestSuite(BusinessAgreementWithParticipantCompletionParticipantTestCase.class));
- addTest(new junit.framework.TestSuite(BusinessAgreementWithParticipantCompletionCoordinatorTestCase.class));
- //addTest(new junit.framework.TestSuite(BusinessAgreementWithCoordinatorCompletionServiceTestCase.class));
- addTest(new junit.framework.TestSuite(BusinessAgreementWithCoordinatorCompletionParticipantTestCase.class));
- addTest(new junit.framework.TestSuite(BusinessAgreementWithCoordinatorCompletionCoordinatorTestCase.class));
- // these tests refer to a sercie which no longer exists
- //addTest(new junit.framework.TestSuite(BAParticipantManagerServiceTestCase.class));
- //addTest(new junit.framework.TestSuite(BAParticipantManagerParticipantTestCase.class));
- //addTest(new junit.framework.TestSuite(BAParticipantManagerCoordinatorTestCase.class));
- //addTest(new junit.framework.TestSuite(BusinessActivityTerminatorServiceTestCase.class));
- }
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+ at RunWith(Suite.class)
+ @Suite.SuiteClasses({
+ CompletionParticipantTestCase.class,
+ CompletionParticipantTestCase.class,
+ TwoPCParticipantTestCase.class,
+ TwoPCCoordinatorTestCase.class,
+ CompletionServiceTestCase.class,
+ BusinessAgreementWithParticipantCompletionParticipantTestCase.class,
+ BusinessAgreementWithParticipantCompletionCoordinatorTestCase.class,
+ BusinessAgreementWithCoordinatorCompletionParticipantTestCase.class,
+ BusinessAgreementWithCoordinatorCompletionCoordinatorTestCase.class
+ })
+public class TestSuite
+{
}
Modified: labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/TwoPCCoordinatorTestCase.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/TwoPCCoordinatorTestCase.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/TwoPCCoordinatorTestCase.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -30,7 +30,10 @@
import javax.xml.namespace.QName;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
import com.arjuna.webservices.SoapFault;
import com.arjuna.webservices.SoapFaultType;
@@ -45,7 +48,7 @@
import com.arjuna.webservices.wsat.processors.ParticipantProcessor;
import com.arjuna.wst.tests.junit.TestParticipantProcessor.ParticipantDetails;
-public class TwoPCCoordinatorTestCase extends TestCase
+public class TwoPCCoordinatorTestCase
{
private ParticipantProcessor origParticipantProcessor ;
@@ -53,7 +56,8 @@
private String participanURIService;
private String coordinatorServiceURI;
- protected void setUp()
+ @Before
+ public void setUp()
throws Exception
{
origParticipantProcessor = ParticipantProcessor.setProcessor(testParticipantProcessor) ;
@@ -62,6 +66,7 @@
coordinatorServiceURI = soapRegistry.getServiceURI(AtomicTransactionConstants.SERVICE_COORDINATOR) ;
}
+ @Test
public void testSendPrepare()
throws Exception
{
@@ -78,6 +83,7 @@
checkDetails(details, true, messageId, null);
}
+ @Test
public void testSendCommit()
throws Exception
{
@@ -94,6 +100,7 @@
checkDetails(details, true, messageId, null);
}
+ @Test
public void testSendRollback()
throws Exception
{
@@ -110,6 +117,7 @@
checkDetails(details, true, messageId, null);
}
+ @Test
public void testSendError()
throws Exception
{
@@ -135,7 +143,8 @@
checkDetails(details, false, messageId, null);
}
- protected void tearDown()
+ @After
+ public void tearDown()
throws Exception
{
ParticipantProcessor.setProcessor(origParticipantProcessor) ;
Modified: labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/TwoPCParticipantTestCase.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/TwoPCParticipantTestCase.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/TwoPCParticipantTestCase.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -30,7 +30,10 @@
import javax.xml.namespace.QName;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
import com.arjuna.webservices.SoapFault;
import com.arjuna.webservices.SoapFaultType;
@@ -48,12 +51,13 @@
import com.arjuna.webservices.wsat.processors.CoordinatorProcessor;
import com.arjuna.wst.tests.junit.TestCoordinatorProcessor.CoordinatorDetails;
-public class TwoPCParticipantTestCase extends TestCase
+public class TwoPCParticipantTestCase
{
private CoordinatorProcessor origCoordinatorProcessor ;
private TestCoordinatorProcessor testCoordinatorProcessor = new TestCoordinatorProcessor();
- protected void setUp()
+ @Before
+ public void setUp()
throws Exception
{
origCoordinatorProcessor = CoordinatorProcessor.getProcessor();
@@ -64,6 +68,7 @@
participantServiceURI = soapRegistry.getServiceURI(AtomicTransactionConstants.SERVICE_PARTICIPANT) ;
}
+ @Test
public void testSendPrepared()
throws Exception
{
@@ -82,6 +87,7 @@
checkDetails(details, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendAborted()
throws Exception
{
@@ -100,6 +106,7 @@
checkDetails(details, false, messageId, instanceIdentifier);
}
+ @Test
public void testSendReadOnly()
throws Exception
{
@@ -118,6 +125,7 @@
checkDetails(details, false, messageId, instanceIdentifier);
}
+ @Test
public void testSendCommitted()
throws Exception
{
@@ -136,6 +144,7 @@
checkDetails(details, false, messageId, instanceIdentifier);
}
+ @Test
public void testSendReplay()
throws Exception
{
@@ -154,6 +163,7 @@
checkDetails(details, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendError()
throws Exception
{
@@ -178,7 +188,8 @@
checkDetails(details, false, messageId, null);
}
- protected void tearDown()
+ @After
+ public void tearDown()
throws Exception
{
CoordinatorProcessor.setProcessor(origCoordinatorProcessor);
Modified: labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/TwoPCServiceTestCase.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/TwoPCServiceTestCase.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst/tests/junit/TwoPCServiceTestCase.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -28,7 +28,10 @@
package com.arjuna.wst.tests.junit;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
import com.arjuna.webservices.SoapRegistry;
import com.arjuna.webservices.wsaddr.AttributedURIType;
@@ -42,9 +45,10 @@
import com.arjuna.wst.stub.ParticipantStub;
import com.arjuna.wst.tests.TestUtil;
-public class TwoPCServiceTestCase extends TestCase
+public class TwoPCServiceTestCase
{
- protected void setUp()
+ @Before
+ public void setUp()
throws Exception
{
final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
@@ -80,6 +84,7 @@
_nonexistentStub = new ParticipantStub("twoPCCoordinator", false, nonexistentCoordinator);
}
+ @Test
public void testPrepareWithPreparedVote()
throws Exception
{
@@ -89,6 +94,7 @@
assertTrue("Expected vote \"Prepared\" got \"" + vote.getClass().getName() + "\"", vote instanceof com.arjuna.wst.Prepared);
}
+ @Test
public void testPrepareWithAbortedVote()
throws Exception
{
@@ -98,6 +104,7 @@
assertTrue("Expected vote \"Aborted\" got \"" + vote.getClass().getName() + "\"", vote instanceof com.arjuna.wst.Aborted);
}
+ @Test
public void testPrepareWithReadOnlyVote()
throws Exception
{
@@ -107,30 +114,35 @@
assertTrue("Expected vote \"ReadOnly\" got \"" + vote.getClass().getName() + "\"", vote instanceof com.arjuna.wst.ReadOnly);
}
+ @Test
public void testCommitWithNoException()
throws Exception
{
_noExceptionStub.commit();
}
+ @Test
public void testRollbackWithNoException()
throws Exception
{
_noExceptionStub.rollback();
}
+ @Test
public void testUnknownWithNoException()
throws Exception
{
_noExceptionStub.unknown();
}
+ @Test
public void testErrorWithNoException()
throws Exception
{
_noExceptionStub.error();
}
+ @Test
public void testPrepareWithWrongStateException()
throws Exception
{
@@ -144,6 +156,7 @@
}
}
+ @Test
public void testCommitWithWrongStateException()
throws Exception
{
@@ -157,6 +170,7 @@
}
}
+ @Test
public void testRollbackWithWrongStateException()
throws Exception
{
@@ -170,6 +184,7 @@
}
}
+ @Test
public void testPrepareWithSystemException()
throws Exception
{
@@ -183,6 +198,7 @@
}
}
+ @Test
public void testCommitWithSystemException()
throws Exception
{
@@ -196,6 +212,7 @@
}
}
+ @Test
public void testRollbackWithSystemException()
throws Exception
{
@@ -209,18 +226,21 @@
}
}
+ @Test
public void testUnknownWithSystemException()
throws Exception
{
_systemExceptionStub.unknown();
}
+ @Test
public void testErrorWithSystemException()
throws Exception
{
_systemExceptionStub.error();
}
+ @Test
public void testPrepareWithNonExistent()
throws Exception
{
@@ -234,6 +254,7 @@
}
}
+ @Test
public void testCommitWithNonExistent()
throws Exception
{
@@ -247,6 +268,7 @@
}
}
+ @Test
public void testRollbackWithNonExistent()
throws Exception
{
@@ -260,19 +282,22 @@
}
}
+ @Test
public void testUnknownWithNonExistent()
throws Exception
{
_nonexistentStub.unknown();
}
+ @Test
public void testErrorWithNonExistent()
throws Exception
{
_nonexistentStub.error();
}
- protected void tearDown()
+ @After
+ public void tearDown()
throws Exception
{
_preparedVoteStub = null;
Modified: labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst11/tests/junit/BusinessAgreementWithCoordinatorCompletionCoordinatorTestCase.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst11/tests/junit/BusinessAgreementWithCoordinatorCompletionCoordinatorTestCase.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst11/tests/junit/BusinessAgreementWithCoordinatorCompletionCoordinatorTestCase.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -29,7 +29,10 @@
import javax.xml.namespace.QName;
import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
import com.arjuna.webservices.SoapFaultType;
import com.arjuna.webservices.wsarjtx.ArjunaTXConstants;
@@ -45,17 +48,19 @@
import com.arjuna.wst11.tests.junit.TestCoordinatorCompletionParticipantProcessor.CoordinatorCompletionParticipantDetails;
import com.arjuna.wst11.tests.TestUtil;
-public class BusinessAgreementWithCoordinatorCompletionCoordinatorTestCase extends TestCase
+public class BusinessAgreementWithCoordinatorCompletionCoordinatorTestCase
{
private CoordinatorCompletionParticipantProcessor origCoordinatorCompletionParticipantProcessor ;
private TestCoordinatorCompletionParticipantProcessor testCoordinatorCompletionParticipantProcessor = new TestCoordinatorCompletionParticipantProcessor() ;
- protected void setUp()
+ @Before
+ public void setUp()
throws Exception
{
origCoordinatorCompletionParticipantProcessor = CoordinatorCompletionParticipantProcessor.setProcessor(testCoordinatorCompletionParticipantProcessor) ;
}
+ @Test
public void testSendClose()
throws Exception
{
@@ -73,6 +78,7 @@
checkDetails(details, true, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendCancel()
throws Exception
{
@@ -90,6 +96,7 @@
checkDetails(details, true, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendCompensate()
throws Exception
{
@@ -107,6 +114,7 @@
checkDetails(details, true, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendFaulted()
throws Exception
{
@@ -124,6 +132,7 @@
checkDetails(details, false, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendExited()
throws Exception
{
@@ -141,6 +150,7 @@
checkDetails(details, false, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendStatus()
throws Exception
{
@@ -161,6 +171,7 @@
checkDetails(details, true, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendComplete()
throws Exception
{
@@ -178,6 +189,7 @@
checkDetails(details, true, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendGetStatus()
throws Exception
{
@@ -195,6 +207,7 @@
checkDetails(details, true, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendError()
throws Exception
{
@@ -220,6 +233,7 @@
checkDetails(details, false, false, messageId, null);
}
+ @Test
public void testSendNotCompleted()
throws Exception
{
@@ -237,7 +251,8 @@
checkDetails(details, false, true, messageId, instanceIdentifier);
}
- protected void tearDown()
+ @After
+ public void tearDown()
throws Exception
{
CoordinatorCompletionParticipantProcessor.setProcessor(origCoordinatorCompletionParticipantProcessor) ;
Modified: labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst11/tests/junit/BusinessAgreementWithCoordinatorCompletionParticipantTestCase.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst11/tests/junit/BusinessAgreementWithCoordinatorCompletionParticipantTestCase.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst11/tests/junit/BusinessAgreementWithCoordinatorCompletionParticipantTestCase.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -26,7 +26,10 @@
package com.arjuna.wst11.tests.junit;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
import com.arjuna.webservices11.SoapFault11;
import com.arjuna.webservices11.wsaddr.AddressingHelper;
@@ -45,17 +48,19 @@
import javax.xml.ws.wsaddressing.W3CEndpointReference;
import javax.xml.namespace.QName;
-public class BusinessAgreementWithCoordinatorCompletionParticipantTestCase extends TestCase
+public class BusinessAgreementWithCoordinatorCompletionParticipantTestCase
{
private CoordinatorCompletionCoordinatorProcessor origCoordinatorCompletionCoordinatorProcessor ;
private TestCoordinatorCompletionCoordinatorProcessor testCoordinatorCompletionCoordinatorProcessor = new TestCoordinatorCompletionCoordinatorProcessor() ;
- protected void setUp()
+ @Before
+ public void setUp()
throws Exception
{
origCoordinatorCompletionCoordinatorProcessor = CoordinatorCompletionCoordinatorProcessor.setProcessor(testCoordinatorCompletionCoordinatorProcessor) ;
}
+ @Test
public void testSendClosed()
throws Exception
{
@@ -73,6 +78,7 @@
checkDetails(details, false, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendCancelled()
throws Exception
{
@@ -90,6 +96,7 @@
checkDetails(details, false, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendCompensated()
throws Exception
{
@@ -107,6 +114,7 @@
checkDetails(details, false, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendFault()
throws Exception
{
@@ -127,6 +135,7 @@
checkDetails(details, true, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendCompleted()
throws Exception
{
@@ -144,6 +153,7 @@
checkDetails(details, true, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendStatus()
throws Exception
{
@@ -164,6 +174,7 @@
checkDetails(details, true, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendError()
throws Exception
{
@@ -189,6 +200,7 @@
checkDetails(details, false, false, messageId, null);
}
+ @Test
public void testSendExit()
throws Exception
{
@@ -206,6 +218,7 @@
checkDetails(details, true, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendGetStatus()
throws Exception
{
@@ -223,7 +236,8 @@
checkDetails(details, true, true, messageId, instanceIdentifier);
}
- protected void tearDown()
+ @After
+ public void tearDown()
throws Exception
{
CoordinatorCompletionCoordinatorProcessor.setProcessor(origCoordinatorCompletionCoordinatorProcessor) ;
Modified: labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst11/tests/junit/BusinessAgreementWithParticipantCompletionCoordinatorTestCase.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst11/tests/junit/BusinessAgreementWithParticipantCompletionCoordinatorTestCase.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst11/tests/junit/BusinessAgreementWithParticipantCompletionCoordinatorTestCase.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -29,7 +29,10 @@
import javax.xml.namespace.QName;
import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
import com.arjuna.webservices.SoapFaultType;
import com.arjuna.webservices.wsarjtx.ArjunaTXConstants;
@@ -46,18 +49,20 @@
import com.arjuna.wst11.tests.junit.TestParticipantCompletionParticipantProcessor.ParticipantCompletionParticipantDetails;
import com.arjuna.wst11.tests.TestUtil;
-public class BusinessAgreementWithParticipantCompletionCoordinatorTestCase extends TestCase
+public class BusinessAgreementWithParticipantCompletionCoordinatorTestCase
{
private ParticipantCompletionParticipantProcessor origParticipantCompletionParticipantProcessor ;
private TestParticipantCompletionParticipantProcessor testParticipantCompletionParticipantProcessor = new TestParticipantCompletionParticipantProcessor() ;
- protected void setUp()
+ @Before
+ public void setUp()
throws Exception
{
origParticipantCompletionParticipantProcessor = ParticipantCompletionParticipantProcessor.setProcessor(testParticipantCompletionParticipantProcessor) ;
final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry() ;
}
+ @Test
public void testSendClose()
throws Exception
{
@@ -75,6 +80,7 @@
checkDetails(details, true, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendCancel()
throws Exception
{
@@ -92,6 +98,7 @@
checkDetails(details, true, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendCompensate()
throws Exception
{
@@ -109,6 +116,7 @@
checkDetails(details, true, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendFaulted()
throws Exception
{
@@ -126,6 +134,7 @@
checkDetails(details, false, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendExited()
throws Exception
{
@@ -143,6 +152,7 @@
checkDetails(details, false, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendStatus()
throws Exception
{
@@ -163,6 +173,7 @@
checkDetails(details, true, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendGetStatus()
throws Exception
{
@@ -180,6 +191,7 @@
checkDetails(details, true, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendError()
throws Exception
{
@@ -204,6 +216,7 @@
checkDetails(details, false, false, messageId, null);
}
+ @Test
public void testSendNotCompleted()
throws Exception
{
@@ -220,7 +233,9 @@
checkDetails(details, false, true, messageId, instanceIdentifier);
}
- protected void tearDown()
+
+ @After
+ public void tearDown()
throws Exception
{
ParticipantCompletionParticipantProcessor.setProcessor(origParticipantCompletionParticipantProcessor) ;
Modified: labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst11/tests/junit/BusinessAgreementWithParticipantCompletionParticipantTestCase.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst11/tests/junit/BusinessAgreementWithParticipantCompletionParticipantTestCase.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst11/tests/junit/BusinessAgreementWithParticipantCompletionParticipantTestCase.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -29,7 +29,10 @@
import javax.xml.namespace.QName;
import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
import com.arjuna.webservices.SoapFaultType;
import com.arjuna.webservices11.SoapFault11;
@@ -45,17 +48,19 @@
import com.arjuna.wst11.tests.junit.TestParticipantCompletionCoordinatorProcessor.ParticipantCompletionCoordinatorDetails;
import com.arjuna.wst11.tests.TestUtil;
-public class BusinessAgreementWithParticipantCompletionParticipantTestCase extends TestCase
+public class BusinessAgreementWithParticipantCompletionParticipantTestCase
{
private ParticipantCompletionCoordinatorProcessor origParticipantCompletionCoordinatorProcessor ;
private TestParticipantCompletionCoordinatorProcessor testParticipantCompletionCoordinatorProcessor = new TestParticipantCompletionCoordinatorProcessor() ;
- protected void setUp()
+ @Before
+ public void setUp()
throws Exception
{
origParticipantCompletionCoordinatorProcessor = ParticipantCompletionCoordinatorProcessor.setProcessor(testParticipantCompletionCoordinatorProcessor) ;
}
+ @Test
public void testSendClosed()
throws Exception
{
@@ -73,6 +78,7 @@
checkDetails(details, false, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendCancelled()
throws Exception
{
@@ -90,6 +96,7 @@
checkDetails(details, false, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendCompensated()
throws Exception
{
@@ -107,6 +114,7 @@
checkDetails(details, false, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendCompleted()
throws Exception
{
@@ -124,6 +132,7 @@
checkDetails(details, true, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendStatus()
throws Exception
{
@@ -144,6 +153,7 @@
checkDetails(details, true, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendError()
throws Exception
{
@@ -168,6 +178,7 @@
checkDetails(details, false, false, messageId, null);
}
+ @Test
public void testSendExit()
throws Exception
{
@@ -185,6 +196,7 @@
checkDetails(details, true, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendFault()
throws Exception
{
@@ -205,6 +217,7 @@
checkDetails(details, true, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendGetStatus()
throws Exception
{
@@ -222,6 +235,7 @@
checkDetails(details, true, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendCannotComplete()
throws Exception
{
@@ -239,7 +253,8 @@
checkDetails(details, true, true, messageId, instanceIdentifier);
}
- protected void tearDown()
+ @After
+ public void tearDown()
throws Exception
{
ParticipantCompletionCoordinatorProcessor.setProcessor(origParticipantCompletionCoordinatorProcessor) ;
Modified: labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst11/tests/junit/CompletionCoordinatorTestCase.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst11/tests/junit/CompletionCoordinatorTestCase.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst11/tests/junit/CompletionCoordinatorTestCase.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -29,7 +29,10 @@
import javax.xml.namespace.QName;
import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
import com.arjuna.webservices.SoapFault;
import com.arjuna.webservices.SoapFaultType;
@@ -44,13 +47,15 @@
import org.jboss.wsf.common.addressing.MAP;
import org.oasis_open.docs.ws_tx.wsat._2006._06.Notification;
-public class CompletionCoordinatorTestCase extends TestCase
+public class CompletionCoordinatorTestCase
{
- protected void setUp()
+ @Before
+ public void setUp()
throws Exception
{
}
+ @Test
public void testSendCommitted()
throws Exception
{
@@ -91,6 +96,7 @@
assertFalse(callback.hasFailed()) ;
}
+ @Test
public void testSendAborted()
throws Exception
{
@@ -132,6 +138,7 @@
assertFalse(callback.hasFailed()) ;
}
+ @Test
public void testSendError()
throws Exception
{
@@ -182,7 +189,8 @@
assertFalse(callback.hasFailed()) ;
}
- protected void tearDown()
+ @After
+ public void tearDown()
throws Exception
{
}
Modified: labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst11/tests/junit/CompletionParticipantTestCase.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst11/tests/junit/CompletionParticipantTestCase.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst11/tests/junit/CompletionParticipantTestCase.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -26,7 +26,10 @@
package com.arjuna.wst11.tests.junit;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
import com.arjuna.webservices11.wsaddr.AddressingHelper;
import org.jboss.wsf.common.addressing.MAP;
@@ -39,18 +42,20 @@
import javax.xml.ws.wsaddressing.W3CEndpointReference;
-public class CompletionParticipantTestCase extends TestCase
+public class CompletionParticipantTestCase
{
private CompletionCoordinatorProcessor origCompletionCoordinatorProcessor ;
private TestCompletionCoordinatorProcessor testCompletionCoordinatorProcessor = new TestCompletionCoordinatorProcessor() ;
- protected void setUp()
+ @Before
+ public void setUp()
throws Exception
{
origCompletionCoordinatorProcessor = CompletionCoordinatorProcessor.setProcessor(testCompletionCoordinatorProcessor) ;
}
+ @Test
public void testSendCommit()
throws Exception
{
@@ -68,6 +73,7 @@
checkDetails(details, true, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendRollback()
throws Exception
{
@@ -85,7 +91,8 @@
checkDetails(details, true, true, messageId, instanceIdentifier);
}
- protected void tearDown()
+ @After
+ public void tearDown()
throws Exception
{
CompletionCoordinatorProcessor.setProcessor(origCompletionCoordinatorProcessor) ;
Modified: labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst11/tests/junit/TestSuite.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst11/tests/junit/TestSuite.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst11/tests/junit/TestSuite.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -27,29 +27,20 @@
package com.arjuna.wst11.tests.junit;
import com.arjuna.wst11.tests.junit.*;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
-public class TestSuite extends junit.framework.TestSuite
+ at RunWith(Suite.class)
+ @Suite.SuiteClasses({
+ CompletionParticipantTestCase.class,
+ CompletionCoordinatorTestCase.class,
+ TwoPCParticipantTestCase.class,
+ TwoPCCoordinatorTestCase.class,
+ BusinessAgreementWithParticipantCompletionParticipantTestCase.class,
+ BusinessAgreementWithParticipantCompletionCoordinatorTestCase.class,
+ BusinessAgreementWithCoordinatorCompletionParticipantTestCase.class,
+ BusinessAgreementWithCoordinatorCompletionCoordinatorTestCase.class
+ })
+public class TestSuite
{
- public TestSuite()
- {
- // the service tests are no longer working
- addTest(new junit.framework.TestSuite(CompletionParticipantTestCase.class));
- addTest(new junit.framework.TestSuite(CompletionCoordinatorTestCase.class));
- addTest(new junit.framework.TestSuite(TwoPCParticipantTestCase.class));
- addTest(new junit.framework.TestSuite(TwoPCCoordinatorTestCase.class));
- //addTest(new junit.framework.TestSuite(CompletionServiceTestCase.class));
- //addTest(new junit.framework.TestSuite(TwoPCServiceTestCase.class));
- //addTest(new junit.framework.TestSuite(BusinessAgreementWithParticipantCompletionServiceTestCase.class));
- addTest(new junit.framework.TestSuite(BusinessAgreementWithParticipantCompletionParticipantTestCase.class));
- addTest(new junit.framework.TestSuite(BusinessAgreementWithParticipantCompletionCoordinatorTestCase.class));
- //addTest(new junit.framework.TestSuite(BusinessAgreementWithCoordinatorCompletionServiceTestCase.class));
- addTest(new junit.framework.TestSuite(BusinessAgreementWithCoordinatorCompletionParticipantTestCase.class));
- addTest(new junit.framework.TestSuite(BusinessAgreementWithCoordinatorCompletionCoordinatorTestCase.class));
- // these tests refer to a sercie which no longer exists
- //addTest(new junit.framework.TestSuite(BAParticipantManagerServiceTestCase.class));
- //addTest(new junit.framework.TestSuite(BAParticipantManagerParticipantTestCase.class));
- //addTest(new junit.framework.TestSuite(BAParticipantManagerCoordinatorTestCase.class));
- //addTest(new junit.framework.TestSuite(BusinessActivityTerminatorServiceTestCase.class));
- }
-
}
\ No newline at end of file
Modified: labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst11/tests/junit/TwoPCCoordinatorTestCase.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst11/tests/junit/TwoPCCoordinatorTestCase.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst11/tests/junit/TwoPCCoordinatorTestCase.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -31,7 +31,10 @@
import javax.xml.namespace.QName;
import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
import com.arjuna.webservices.SoapFault;
import com.arjuna.webservices.SoapFaultType;
@@ -46,18 +49,20 @@
import com.arjuna.wst11.tests.junit.TestParticipantProcessor.ParticipantDetails;
import com.arjuna.wst11.tests.TestUtil;
-public class TwoPCCoordinatorTestCase extends TestCase
+public class TwoPCCoordinatorTestCase
{
private ParticipantProcessor origParticipantProcessor ;
private TestParticipantProcessor testParticipantProcessor = new TestParticipantProcessor() ;
- protected void setUp()
+ @Before
+ public void setUp()
throws Exception
{
origParticipantProcessor = ParticipantProcessor.setProcessor(testParticipantProcessor) ;
}
+ @Test
public void testSendPrepare()
throws Exception
{
@@ -75,6 +80,7 @@
checkDetails(details, true, true, messageId, null);
}
+ @Test
public void testSendCommit()
throws Exception
{
@@ -92,6 +98,7 @@
checkDetails(details, true, true, messageId, null);
}
+ @Test
public void testSendRollback()
throws Exception
{
@@ -109,6 +116,7 @@
checkDetails(details, true, true, messageId, null);
}
+ @Test
public void testSendError()
throws Exception
{
@@ -134,7 +142,8 @@
checkDetails(details, false, false, messageId, null);
}
- protected void tearDown()
+ @After
+ public void tearDown()
throws Exception
{
ParticipantProcessor.setProcessor(origParticipantProcessor) ;
Modified: labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst11/tests/junit/TwoPCParticipantTestCase.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst11/tests/junit/TwoPCParticipantTestCase.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WS-T/tests/src/com/arjuna/wst11/tests/junit/TwoPCParticipantTestCase.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -31,7 +31,10 @@
import javax.xml.namespace.QName;
import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
import com.arjuna.webservices.SoapFaultType;
import com.arjuna.webservices11.SoapFault11;
@@ -45,18 +48,20 @@
import com.arjuna.webservices11.wsaddr.AddressingHelper;
import org.jboss.wsf.common.addressing.MAP;
-public class TwoPCParticipantTestCase extends TestCase
+public class TwoPCParticipantTestCase
{
private CoordinatorProcessor origCoordinatorProcessor ;
private TestCoordinatorProcessor testCoordinatorProcessor = new TestCoordinatorProcessor();
- protected void setUp()
+ @Before
+ public void setUp()
throws Exception
{
origCoordinatorProcessor = CoordinatorProcessor.getProcessor();
CoordinatorProcessor.setProcessor(testCoordinatorProcessor);
}
+ @Test
public void testSendPrepared()
throws Exception
{
@@ -73,6 +78,7 @@
checkDetails(details, true, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendAborted()
throws Exception
{
@@ -89,6 +95,7 @@
checkDetails(details, false, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendReadOnly()
throws Exception
{
@@ -105,6 +112,7 @@
checkDetails(details, false, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendCommitted()
throws Exception
{
@@ -121,6 +129,7 @@
checkDetails(details, false, true, messageId, instanceIdentifier);
}
+ @Test
public void testSendError()
throws Exception
{
@@ -144,7 +153,8 @@
checkDetails(details, false, false, messageId, instanceIdentifier);
}
- protected void tearDown()
+ @After
+ public void tearDown()
throws Exception
{
CoordinatorProcessor.setProcessor(origCoordinatorProcessor);
Modified: labs/jbosstm/trunk/XTS/WSAS/build.xml
===================================================================
--- labs/jbosstm/trunk/XTS/WSAS/build.xml 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSAS/build.xml 2010-03-01 16:40:31 UTC (rev 31894)
@@ -100,7 +100,7 @@
<target name="wsas.jar" depends="wsas.compile, wsas.htdocs, wsas.generateresourcebundle">
<echo message="Building jar file"/>
<mkdir dir="${wsas.jar.dest}"/>
- <jar jarfile="${wsas.jar.dest}/${modulename}.jar" basedir="${wsas.dest}"/>
+ <jar jarfile="${wsas.jar.dest}/${modulename}.jar" basedir="${wsas.dest}" excludes="com/arjuna/qa/junit/*.class"/>
</target>
<target name="wsas.htdocs"
@@ -166,8 +166,9 @@
<target name="wsas.tests.webapps" depends="wsas.tests.compile">
<copy file="${wsas.tests.dd}/wsas-tests_web-app.xml" tofile="${wsas.tests.dd.dest}/web-app.xml">
</copy>
+ <jar jarfile="${wsas.tests.jar.dest}/wsas-tests.jar" basedir="${wsas.tests.dest}" excludes="com/arjuna/qa/junit/*.class"/>
+ <jar jarfile="${wsas.tests.jar.dest}/xts-test-servlet.jar" basedir="${wsas.tests.dest}" includes="com/arjuna/qa/junit/*.class"/>
<war warfile="${wsas.tests.webapps.dest}/wsas-tests.war" webxml="${wsas.tests.dd.dest}/web-app.xml">
- <classes dir="${wsas.tests.dest}"/>
</war>
<ear earfile="${wsas.tests.webapps.dest}/wsas-tests.ear" appxml="${wsas.tests.dd}/wsas-tests_application.xml">
<!-- we only need to deploy the ext test libs (junit) and
@@ -176,7 +177,9 @@
in the server lib
-->
<fileset dir="${xts.ext.dir}" includes="${tests.libs}"/>
- <fileset dir="${wsas.tests.webapps.dest}" includes="wsas-tests.war"/>
+ <fileset dir="${wsas.tests.webapps.dest}" includes="wsas-tests.war"/>
+ <fileset dir="${wsas.tests.jar.dest}" includes="wsas-tests.jar"/>
+ <fileset dir="${wsas.tests.jar.dest}" includes="xts-test-servlet.jar"/>
</ear>
</target>
Copied: labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/qa/junit/TestRunnerServlet.java (from rev 31847, labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/qa/junit/WSCTestRunnerServlet.java)
===================================================================
--- labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/qa/junit/TestRunnerServlet.java (rev 0)
+++ labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/qa/junit/TestRunnerServlet.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -0,0 +1,647 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a full listing
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+/*
+ * Copyright (c) 2002, 2003, Arjuna Technologies Limited.
+ *
+ * TestRunnerServlet.java
+ */
+
+package com.arjuna.qa.junit;
+
+import junit.framework.AssertionFailedError;
+import junit.framework.TestResult;
+import org.junit.runner.Description;
+import org.junit.runner.JUnitCore;
+import org.junit.runner.Result;
+import org.junit.runner.notification.Failure;
+import org.junit.runner.notification.RunListener;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.CharArrayWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+
+public class TestRunnerServlet extends HttpServlet
+{
+ public void init(ServletConfig config) throws ServletException
+ {
+ super.init(config);
+
+ _testSuiteClassName = config.getInitParameter("TestSuiteClassName");
+ }
+
+ protected String getContentType()
+ {
+ return "text/html";
+ }
+
+ public void doGet(HttpServletRequest request, HttpServletResponse response)
+ throws ServletException, IOException
+ {
+ try
+ {
+ PrintWriter writer = response.getWriter();
+
+ response.setContentType(getContentType());
+ response.setHeader("Cache-Control", "no-cache");
+
+ if (request.getParameter("failednumber") != null)
+ doStatusFailed(writer, request, response);
+ else if (request.getParameter("errornumber") != null)
+ doStatusError(writer, request, response);
+ else
+ doStatus(writer, request, response);
+ }
+ catch (Exception exception)
+ {
+ log("Test Runner: doGet failed", exception);
+
+ response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, exception.toString());
+ }
+ catch (Error error)
+ {
+ log("Test Runner: doGet failed", error);
+
+ response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, error.toString());
+ }
+ }
+
+ public void doPost(HttpServletRequest request, HttpServletResponse response)
+ throws ServletException, IOException
+ {
+ try
+ {
+ PrintWriter writer = response.getWriter();
+
+ response.setContentType(getContentType());
+ response.setHeader("Cache-Control", "no-cache");
+
+ if ((_runnerThread == null) || (! _runnerThread.isAlive()))
+ {
+ _runnerThread = new RunnerThread();
+ _runnerThread.start();
+ }
+
+ if (request.getParameter("failednumber") != null)
+ doStatusFailed(writer, request, response);
+ else if (request.getParameter("errornumber") != null)
+ doStatusError(writer, request, response);
+ else
+ doStatus(writer, request, response);
+ }
+ catch (Exception exception)
+ {
+ log("Test Runner: doPost failed", exception);
+
+ response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, exception.toString());
+ }
+ catch (Error error)
+ {
+ log("Test Runner: doPost failed", error);
+
+ response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, error.toString());
+ }
+ }
+
+ public void doStatus(PrintWriter writer, HttpServletRequest request, HttpServletResponse response)
+ throws ServletException
+ {
+ writer.println("<HTML>");
+ writer.println("<HEAD>");
+ writer.println("<TITLE>Test Runner</TITLE>");
+ writer.println("</HEAD>");
+ writer.println("<BODY bgcolor=\"white\" style=\"font-family: Arial, Helvetica, sans-serif\">");
+ writer.println("<DIV style=\"font-family: Arial, Helvetica, sans-serif; font-size: large\"> <BR>Test Runner: Status<BR> </DIV>");
+
+ writer.println("<TABLE width=\"100%\">");
+
+ writer.println("<TR><TD colspan=\"3\" align=\"center\" style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Status</TD></TR>");
+ writer.println("<TR>");
+ writer.println("<TD style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Test suite class:</TD>");
+ writer.println("<TD style=\"font-family: Arial, Helvetica, sans-serif\">" + _testSuiteClassName + "</TD>");
+ writer.println("</TR>");
+
+ if ((_runnerThread == null) || (! _runnerThread.isAlive()))
+ {
+ writer.println("<TR>");
+ writer.println("<TD style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Action:</TD>");
+ writer.print("<TD style=\"font-family: Arial, Helvetica, sans-serif\">");
+ writer.print("<FORM method=\"POST\" action=\"" + request.getRequestURL() + "\">");
+ writer.print("<INPUT type=\"button\" value=\"run\" onclick=\"this.form.submit()\">");
+ writer.print("</FORM>");
+ writer.println("</TD>");
+ writer.println("</TR>");
+ }
+ else
+ {
+ writer.println("<TR>");
+ writer.println("<TD style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Action:</TD>");
+ writer.print("<TD style=\"font-family: Arial, Helvetica, sans-serif\">");
+ writer.print("<FORM method=\"GET\" action=\"" + request.getRequestURL() + "\">");
+ writer.print("<INPUT type=\"button\" value=\"reload\" onclick=\"this.form.submit()\">");
+ writer.print("</FORM>");
+ writer.println("</TD>");
+ writer.println("</TR>");
+
+ if (_currentTest != null)
+ {
+ writer.println("<TR>");
+ writer.println("<TD style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Current test:</TD>");
+ writer.print("<TD style=\"font-family: Arial, Helvetica, sans-serif\">");
+ encode(writer, _currentTest.toString());
+ writer.println("</TD>");
+ writer.println("</TR>");
+ }
+ }
+ writer.println("</TR>");
+ writer.println("<TR>");
+ writer.println("<TD style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Passed count:</TD>");
+ writer.println("<TD style=\"font-family: Arial, Helvetica, sans-serif\">" + _passedTests.size() + "</TD>");
+ writer.println("</TR>");
+ writer.println("<TR>");
+ writer.println("<TD style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Failed count:</TD>");
+ writer.println("<TD style=\"font-family: Arial, Helvetica, sans-serif\">" + _failedTests.size() + "</TD>");
+ writer.println("</TR>");
+ writer.println("<TR>");
+ writer.println("<TD style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Error count:</TD>");
+ writer.println("<TD style=\"font-family: Arial, Helvetica, sans-serif\">" + _errorTests.size() + "</TD>");
+ writer.println("</TR>");
+
+ writer.println("</TABLE>");
+
+ if (! _passedTests.isEmpty())
+ {
+ writer.println("<BR>");
+
+ writer.println("<TABLE width=\"100%\">");
+
+ writer.println("<TR><TD colspan=\"3\" align=\"center\" style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Passes</TD></TR>");
+
+ writer.println("<TR>");
+ writer.println("<TD align=\"center\" style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Test</TD>");
+ writer.println("<TD align=\"center\" style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Duration</TD>");
+ writer.println("</TR>");
+
+ Iterator passedTestsIterator = _passedTests.iterator();
+ while (passedTestsIterator.hasNext())
+ {
+ PassedTest passedTest = (PassedTest) passedTestsIterator.next();
+ writer.println("<TR>");
+ writer.print("<TD style=\"font-family: Arial, Helvetica, sans-serif\">");
+ encode(writer, passedTest.description.toString());
+ writer.println("</TD>");
+ writer.print("<TD align=\"center\" style=\"font-family: Arial, Helvetica, sans-serif\">" + passedTest.duration + " ms</TD>");
+ writer.println("</TR>");
+ }
+
+ writer.println("</TABLE>");
+ }
+
+ if (! _failedTests.isEmpty())
+ {
+ writer.println("<BR>");
+
+ writer.println("<TABLE width=\"100%\">");
+
+ writer.println("<TR><TD colspan=\"3\" align=\"center\" style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Failures</TD></TR>");
+ writer.println("<TR>");
+ writer.println("<TD align=\"center\" style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Test</TD>");
+ writer.println("<TD align=\"center\" style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Duration</TD>");
+ writer.println("<TD align=\"center\" style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Message</TD>");
+ writer.println("</TR>");
+
+ int failedNumber = 0;
+ Iterator failedTestsIterator = _failedTests.iterator();
+ while (failedTestsIterator.hasNext())
+ {
+ FailedTest failedTest = (FailedTest) failedTestsIterator.next();
+ writer.println("<TR>");
+ writer.print("<TD style=\"font-family: Arial, Helvetica, sans-serif\">");
+ writer.print("<A href=\"" + request.getRequestURL() + "?failednumber=" + failedNumber + "\">");
+ encode(writer, failedTest.description.toString());
+ writer.print("</A>");
+ writer.println("</TD>");
+ writer.print("<TD align=\"center\" style=\"font-family: Arial, Helvetica, sans-serif\">" + failedTest.duration + " ms</TD>");
+ writer.print("<TD style=\"font-family: Arial, Helvetica, sans-serif\">");
+ encode(writer, failedTest.assertionFailedError.getMessage());
+ writer.println("</TD>");
+ writer.println("</TR>");
+ failedNumber++;
+ }
+
+ writer.println("</TABLE>");
+
+ writer.println("<BR>");
+ }
+
+ if (! _errorTests.isEmpty())
+ {
+ writer.println("<TABLE width=\"100%\">");
+ writer.println("<TR>");
+ writer.println("<TR><TD colspan=\"3\" align=\"center\" style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Errors</TD></TR>");
+ writer.println("<TD align=\"center\" style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Test</TD>");
+ writer.println("<TD align=\"center\" style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Duration</TD>");
+ writer.println("<TD align=\"center\" style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Exception/Error</TD>");
+ writer.println("</TR>");
+
+ int errorNumber = 0;
+ Iterator errorTestsIterator = _errorTests.iterator();
+ while (errorTestsIterator.hasNext())
+ {
+ ErrorTest errorTest = (ErrorTest) errorTestsIterator.next();
+ writer.println("<TR>");
+ writer.print("<TD style=\"font-family: Arial, Helvetica, sans-serif\">");
+ writer.print("<A href=\"" + request.getRequestURL() + "?errornumber=" + errorNumber + "\">");
+ encode(writer, errorTest.description.toString());
+ writer.print("</A>");
+ writer.println("</TD>");
+ writer.print("<TD align=\"center\" style=\"font-family: Arial, Helvetica, sans-serif\">" + errorTest.duration + " ms</TD>");
+ writer.print("<TD style=\"font-family: Arial, Helvetica, sans-serif\">");
+ encode(writer, errorTest.throwable.toString());
+ writer.println("</TD>");
+ writer.println("</TR>");
+ errorNumber++;
+ }
+
+ writer.println("</TABLE>");
+ }
+
+ writer.println("</BODY>");
+ writer.println("</HTML>");
+ }
+
+ public void doStatusFailed(PrintWriter writer, HttpServletRequest request, HttpServletResponse response)
+ throws ServletException
+ {
+ int failedIndex = 0;
+ FailedTest failedTest = null;
+
+ try
+ {
+ String failedIndexString = (String) request.getParameter("failednumber");
+
+ failedIndex = Integer.parseInt(failedIndexString);
+ failedTest = (FailedTest) _failedTests.get(failedIndex);
+ }
+ catch (Exception exception)
+ {
+ failedTest = null;
+ }
+
+ if (failedTest != null)
+ {
+ writer.println("<HTML>");
+ writer.println("<HEAD>");
+ writer.println("<TITLE>Test Runner</TITLE>");
+ writer.println("</HEAD>");
+ writer.println("<BODY bgcolor=\"white\" style=\"font-family: Arial, Helvetica, sans-serif\">");
+ writer.println("<DIV style=\"font-family: Arial, Helvetica, sans-serif; font-size: large\"> <BR>Test Runner: Failed Status<BR> </DIV>");
+
+ writer.println("<TABLE>");
+
+ writer.print("<TR>");
+ writer.print("<TD style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Test:</TD>");
+ writer.print("<TD style=\"font-family: Arial, Helvetica, sans-serif\">");
+ encode(writer, failedTest.description.toString());
+ writer.println("</TD>");
+ writer.println("</TR>");
+
+ writer.println("<TR>");
+ writer.print("<TD style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Duration:</TD>");
+ writer.print("<TD style=\"font-family: Arial, Helvetica, sans-serif\">" + failedTest.duration + " ms</TD>");
+ writer.println("</TR>");
+
+ writer.println("<TR>");
+ writer.print("<TD style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Message:</TD>");
+ writer.print("<TD style=\"font-family: Arial, Helvetica, sans-serif\">");
+ encode(writer, failedTest.assertionFailedError.getMessage());
+ writer.println("</TD>");
+ writer.println("</TR>");
+
+ writer.print("<TR>");
+ writer.print("<TD colspan=\"2\" style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Stack trace:</TD>");
+ writer.println("</TR>");
+ writer.println("<TR>");
+ writer.println("<TD colspan=\"2\" style=\"font-family: Arial, Helvetica, sans-serif\">");
+ writer.println("<PRE>");
+ CharArrayWriter charArrayWriter = new CharArrayWriter();
+ PrintWriter printWriter = new PrintWriter(charArrayWriter, true);
+ failedTest.assertionFailedError.printStackTrace(printWriter);
+ printWriter.close();
+ charArrayWriter.close();
+ encode(writer, charArrayWriter.toString());
+ writer.println("</PRE>");
+ writer.println("</TD>");
+ writer.println("</TR>");
+
+ writer.println("</TABLE>");
+
+ writer.println("<TABLE width=\"100%\">");
+ writer.println("<TR>");
+ writer.println("<TD align=\"left\" width=\"33%\" style=\"font-family: Arial, Helvetica, sans-serif\">");
+ if (failedIndex > 0)
+ writer.println("<A href=\"" + request.getRequestURL() + "?failednumber=" + (failedIndex - 1)+ "\">previous</A>");
+ else
+ writer.print(" ");
+ writer.println("</TD>");
+ writer.println("<TD align=\"center\" width=\"33%\" style=\"font-family: Arial, Helvetica, sans-serif\">");
+ writer.println("<A href=\"" + request.getRequestURL() + "\">all</A>");
+ writer.println("</TD>");
+ writer.println("<TD align=\"right\" width=\"33%\" style=\"font-family: Arial, Helvetica, sans-serif\">");
+ if (failedIndex < (_failedTests.size() - 1))
+ writer.println("<A href=\"" + request.getRequestURL() + "?failednumber=" + (failedIndex + 1)+ "\">next</A>");
+ else
+ writer.print(" ");
+ writer.println("</TD>");
+ writer.println("</TR>");
+ writer.println("</TABLE>");
+
+ writer.println("</BODY>");
+ writer.println("</HTML>");
+ }
+ else
+ doStatus(writer, request, response);
+ }
+
+ public void doStatusError(PrintWriter writer, HttpServletRequest request, HttpServletResponse response)
+ throws ServletException
+ {
+ int errorIndex = 0;
+ ErrorTest errorTest = null;
+
+ try
+ {
+ String errorIndexString = (String) request.getParameter("errornumber");
+
+ errorIndex = Integer.parseInt(errorIndexString);
+ errorTest = (ErrorTest) _errorTests.get(errorIndex);
+ }
+ catch (Exception exception)
+ {
+ errorTest = null;
+ }
+
+ if (errorTest != null)
+ {
+ writer.println("<HTML>");
+ writer.println("<HEAD>");
+ writer.println("<TITLE>Test Runner</TITLE>");
+ writer.println("</HEAD>");
+ writer.println("<BODY bgcolor=\"white\" style=\"font-family: Arial, Helvetica, sans-serif\">");
+ writer.println("<DIV style=\"font-family: Arial, Helvetica, sans-serif; font-size: large\"> <BR>Test Runner: Error Status<BR> </DIV>");
+
+ writer.println("<TABLE>");
+
+ writer.print("<TR>");
+ writer.print("<TD style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Test:</TD>");
+ writer.print("<TD style=\"font-family: Arial, Helvetica, sans-serif\">");
+ encode(writer, errorTest.description.toString());
+ writer.println("</TD>");
+ writer.println("</TR>");
+
+ writer.println("<TR>");
+ writer.print("<TD style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Duration:</TD>");
+ writer.print("<TD style=\"font-family: Arial, Helvetica, sans-serif\">" + errorTest.duration + " ms</TD>");
+ writer.println("</TR>");
+
+ writer.println("<TR>");
+ writer.print("<TD style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Exception/error:</TD>");
+ writer.print("<TD style=\"font-family: Arial, Helvetica, sans-serif\">");
+ encode(writer, errorTest.throwable.toString());
+ writer.println("</TD>");
+ writer.println("</TR>");
+
+ writer.print("<TR>");
+ writer.print("<TD colspan=\"2\" style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Stack trace:</TD>");
+ writer.println("</TR>");
+ writer.println("<TR>");
+ writer.println("<TD colspan=\"2\" style=\"font-family: Arial, Helvetica, sans-serif\">");
+ writer.println("<PRE>");
+ CharArrayWriter charArrayWriter = new CharArrayWriter();
+ PrintWriter printWriter = new PrintWriter(charArrayWriter, true);
+ errorTest.throwable.printStackTrace(printWriter);
+ printWriter.close();
+ charArrayWriter.close();
+ encode(writer, charArrayWriter.toString());
+ writer.println("</PRE>");
+ writer.println("</TD>");
+ writer.println("</TR>");
+
+ writer.println("</TABLE>");
+
+ writer.println("<TABLE width=\"100%\">");
+ writer.println("<TR>");
+ writer.println("<TD align=\"left\" width=\"33%\" style=\"font-family: Arial, Helvetica, sans-serif\">");
+ if (errorIndex > 0)
+ writer.println("<A href=\"" + request.getRequestURL() + "?errornumber=" + (errorIndex - 1)+ "\">previous</A>");
+ else
+ writer.print(" ");
+ writer.println("</TD>");
+ writer.println("<TD align=\"center\" width=\"33%\" style=\"font-family: Arial, Helvetica, sans-serif\">");
+ writer.println("<A href=\"" + request.getRequestURL() + "\">all</A>");
+ writer.println("</TD>");
+ writer.println("<TD align=\"right\" width=\"33%\" style=\"font-family: Arial, Helvetica, sans-serif\">");
+ if (errorIndex < (_errorTests.size() - 1))
+ writer.println("<A href=\"" + request.getRequestURL() + "?errornumber=" + (errorIndex + 1)+ "\">next</A>");
+ else
+ writer.print(" ");
+ writer.println("</TD>");
+ writer.println("</TR>");
+ writer.println("</TABLE>");
+
+ writer.println("</BODY>");
+ writer.println("</HTML>");
+ }
+ else
+ doStatus(writer, request, response);
+ }
+
+ protected class PassedTest
+ {
+ public Description description;
+ public long duration;
+ }
+
+ protected class FailedTest
+ {
+ public Description description;
+ public long duration;
+ public AssertionFailedError assertionFailedError;
+ }
+
+ protected class ErrorTest
+ {
+ public Description description;
+ public long duration;
+ public Throwable throwable;
+ }
+
+ protected class RunnerThread extends Thread
+ {
+ RunnerThread()
+ {
+ super("JUnit Runner Thread") ;
+ }
+
+ public void run()
+ {
+ try
+ {
+ _passedTests.clear();
+ _failedTests.clear();
+ _errorTests.clear();
+
+ Class testSuiteClass = Class.forName(_testSuiteClassName);
+ org.junit.runner.notification.RunListener testListener = new BasicTestListener();
+ JUnitCore core = new JUnitCore();
+ core.addListener(testListener);
+ core.run(testSuiteClass);
+ }
+ catch (Exception exception)
+ {
+ log("Runner Thread: run failed", exception);
+ }
+ catch (Error error)
+ {
+ log("Runner Thread: run failed", error);
+ }
+ }
+ }
+
+ private class BasicTestListener extends RunListener
+ {
+ @Override
+ public void testRunStarted(Description description) throws Exception {
+ super.testRunStarted(description);
+ _running = true;
+ }
+
+ @Override
+ public void testRunFinished(Result result) throws Exception {
+ super.testRunFinished(result);
+ _running = false;
+ }
+
+ @Override
+ public void testStarted(Description description) throws Exception {
+ super.testStarted(description);
+ _startTime = System.currentTimeMillis();
+ _currentTest = description;
+ }
+
+ @Override
+ public void testFinished(Description description) throws Exception {
+ super.testFinished(description);
+ if (!_fail) {
+ PassedTest passedTest = new PassedTest();
+ passedTest.description = description;
+ passedTest.duration = System.currentTimeMillis() - _startTime;
+ _passedTests.add(passedTest);
+
+ _currentTest = null;
+ }
+ }
+
+ @Override
+ public void testFailure(Failure failure) throws Exception {
+ super.testFailure(failure);
+ _fail = true;
+ Throwable _throwable = failure.getException();
+ _throwable.printStackTrace(System.out);
+ if (_throwable instanceof AssertionFailedError) {
+ FailedTest failedTest = new FailedTest();
+ failedTest.description = failure.getDescription();
+ failedTest.duration = System.currentTimeMillis() - _startTime;
+ failedTest.assertionFailedError = (AssertionFailedError)_throwable;
+ _failedTests.add(failedTest);
+ } else {
+ ErrorTest errorTest = new ErrorTest();
+ errorTest.description = failure.getDescription();
+ errorTest.duration = System.currentTimeMillis() - _startTime;
+ errorTest.throwable = _throwable;
+ _errorTests.add(errorTest);
+ }
+
+ _currentTest = null;
+ }
+
+ @Override
+ public void testAssumptionFailure(Failure failure) {
+ super.testAssumptionFailure(failure);
+ _fail=true;
+ Throwable _throwable = failure.getException();
+ _throwable.printStackTrace(System.out);
+ ErrorTest errorTest = new ErrorTest();
+ errorTest.description = failure.getDescription();
+ errorTest.duration = System.currentTimeMillis() - _startTime;
+ errorTest.throwable = _throwable;
+ _errorTests.add(errorTest);
+
+ _currentTest = null;
+ }
+
+ @Override
+ public void testIgnored(Description description) throws Exception {
+ super.testIgnored(description);
+ _currentTest = null;
+ }
+
+ private long _startTime = 0;
+ private boolean _fail = false;
+ }
+
+ protected static void encode(PrintWriter writer, String string)
+ {
+ if (string != null)
+ {
+ char[] chars = string.toCharArray();
+
+ for (int index = 0; index < chars.length; index++)
+ if (chars[index] == '<')
+ writer.print("<");
+ else if (chars[index] == '>')
+ writer.print(">");
+ else if (chars[index] == '&')
+ writer.print("&");
+ else
+ writer.print(chars[index]);
+ }
+ else
+ writer.print("null");
+ }
+
+ protected List _passedTests = new LinkedList();
+ protected List _failedTests = new LinkedList();
+ protected List _errorTests = new LinkedList();
+ protected Description _currentTest = null;
+ protected String _testSuiteClassName = null;
+ protected RunnerThread _runnerThread = null;
+ protected TestResult _testResult = null;
+ protected boolean _running = false;
+
+}
Copied: labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/qa/junit/TestRunnerXMLServlet.java (from rev 31847, labs/jbosstm/trunk/XTS/WS-C/tests/src/com/arjuna/qa/junit/WSCTestRunnerXMLServlet.java)
===================================================================
--- labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/qa/junit/TestRunnerXMLServlet.java (rev 0)
+++ labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/qa/junit/TestRunnerXMLServlet.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -0,0 +1,209 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a full listing
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.qa.junit;
+
+import org.dom4j.dom.DOMDocument;
+import org.dom4j.dom.DOMElement;
+import org.dom4j.io.OutputFormat;
+import org.dom4j.io.XMLWriter;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.CharArrayWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.Date;
+import java.util.Iterator;
+
+/**
+ * @author <a href="mailto:istudens at redhat.com">Ivo Studensky</a>
+ * @version $Revision$
+ */
+public class TestRunnerXMLServlet extends TestRunnerServlet
+{
+
+ @Override
+ protected String getContentType()
+ {
+ return "text/xml";
+ }
+
+ @Override
+ public void doStatus(PrintWriter writer, HttpServletRequest request, HttpServletResponse response)
+ throws ServletException
+ {
+
+ DOMDocument report = new DOMDocument();
+ DOMElement testsuite = new DOMElement("testsuite");
+ report.setRootElement(testsuite);
+ testsuite.addAttribute("name", _testSuiteClassName);
+ testsuite.addAttribute("errors", Integer.toString(_errorTests.size()));
+ testsuite.addAttribute("failures", Integer.toString(_failedTests.size()));
+ testsuite.addAttribute("hostname", request.getServerName());
+ testsuite.addAttribute("tests", Integer.toString((_testResult != null) ? _testResult.runCount() : 0));
+ testsuite.addAttribute("timestamp", new Date().toString());
+
+ DOMElement properties = new DOMElement("properties");
+ testsuite.add(properties);
+ DOMElement status = newPropertyDOMElement("status");
+ properties.add(status);
+ if ((_runnerThread == null) || (! _runnerThread.isAlive()))
+ {
+ if (_passedTests.isEmpty() && _failedTests.isEmpty() && _errorTests.isEmpty())
+ {
+ status.addAttribute("value", "stopped");
+ }
+ else
+ {
+ status.addAttribute("value", "finished");
+ }
+ }
+ else if (_currentTest != null)
+ {
+ status.addAttribute("value", "running");
+ properties.add(newPropertyDOMElement("current-test", _currentTest.toString()));
+ }
+
+ long totalDuration = 0;
+
+ if (! _passedTests.isEmpty())
+ {
+ Iterator passedTestsIterator = _passedTests.iterator();
+ while (passedTestsIterator.hasNext())
+ {
+ PassedTest passedTest = (PassedTest) passedTestsIterator.next();
+ totalDuration += passedTest.duration;
+
+ testsuite.add(newTestcase(
+ passedTest.description.getClass().getName(), passedTest.description.toString(), passedTest.duration));
+ }
+ }
+
+ if (! _failedTests.isEmpty())
+ {
+ Iterator failedTestsIterator = _failedTests.iterator();
+ while (failedTestsIterator.hasNext())
+ {
+ FailedTest failedTest = (FailedTest) failedTestsIterator.next();
+ totalDuration += failedTest.duration;
+
+ CharArrayWriter charArrayWriter = new CharArrayWriter();
+ PrintWriter printWriter = new PrintWriter(charArrayWriter, true);
+ failedTest.assertionFailedError.printStackTrace(printWriter);
+ printWriter.close();
+ charArrayWriter.close();
+
+ testsuite.add(newFailedTestcase(
+ failedTest.description.getClass().getName(), failedTest.description.toString(), failedTest.duration,
+ failedTest.assertionFailedError.getMessage(), charArrayWriter.toString()));
+ }
+ }
+
+ if (! _errorTests.isEmpty())
+ {
+ Iterator errorTestsIterator = _errorTests.iterator();
+ while (errorTestsIterator.hasNext())
+ {
+ ErrorTest errorTest = (ErrorTest) errorTestsIterator.next();
+ totalDuration += errorTest.duration;
+
+ CharArrayWriter charArrayWriter = new CharArrayWriter();
+ PrintWriter printWriter = new PrintWriter(charArrayWriter, true);
+ errorTest.throwable.printStackTrace(printWriter);
+ printWriter.close();
+ charArrayWriter.close();
+
+ System.out.println("charArrayWriter.toString()=" + charArrayWriter.toString());
+ testsuite.add(newErrorTestcase(
+ errorTest.description.getClass().getName(), errorTest.description.toString(), errorTest.duration,
+ errorTest.throwable.getMessage(), charArrayWriter.toString()));
+ }
+ }
+ testsuite.add(new DOMElement("system-out").addCDATA(""));
+ testsuite.add(new DOMElement("system-err").addCDATA(""));
+ // total time of all tests
+ testsuite.addAttribute("time", Float.toString(totalDuration / 1000f));
+
+ XMLWriter outputter = new XMLWriter(writer, OutputFormat.createPrettyPrint());
+ try {
+ outputter.write(testsuite);
+ outputter.close();
+ } catch (IOException e) {
+ throw new ServletException(e);
+ }
+ }
+
+ private DOMElement newPropertyDOMElement(String name)
+ {
+ return newPropertyDOMElement(name, null);
+ }
+
+ private DOMElement newPropertyDOMElement(String name, String value)
+ {
+ DOMElement property = new DOMElement("property");
+ property.addAttribute("name", name);
+ if (value != null)
+ {
+ property.addAttribute("value", value);
+ }
+ return property;
+ }
+
+ private DOMElement newTestcase(String classname, String name, long duration)
+ {
+ return newTestcase(classname, name, duration, null, null, null);
+ }
+
+ private DOMElement newFailedTestcase(String classname, String name, long duration, String failureMessage, String failureDetail)
+ {
+ return newTestcase(classname, name, duration, "junit.framework.AssertionFailedError", failureMessage, failureDetail);
+ }
+
+ private DOMElement newErrorTestcase(String classname, String name, long duration, String failureMessage, String failureDetail)
+ {
+ return newTestcase(classname, name, duration, "junit.framework.throwable", failureMessage, failureDetail);
+ }
+
+ private DOMElement newTestcase(String classname, String name, long duration, String failureMessage, String failureType, String failureDetail)
+ {
+ DOMElement testcase = new DOMElement("testcase");
+ testcase.addAttribute("classname", classname);
+ testcase.addAttribute("name", name);
+ testcase.addAttribute("time", Float.toString(duration / 1000f)); // converts from miliseconds to seconds
+ if (failureMessage != null)
+ {
+ DOMElement failure = new DOMElement("failure");
+ testcase.add(failure);
+ failure.addAttribute("message", failureMessage);
+ if (failureType != null)
+ {
+ failure.addAttribute("type", failureType);
+ }
+ if (failureDetail != null)
+ {
+ failure.addCDATA(failureDetail);
+ }
+ }
+ return testcase;
+ }
+
+}
Deleted: labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/qa/junit/WSASTestRunnerServlet.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/qa/junit/WSASTestRunnerServlet.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/qa/junit/WSASTestRunnerServlet.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -1,624 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags.
- * See the copyright.txt in the distribution for a full listing
- * of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2005-2006,
- * @author JBoss Inc.
- */
-/*
- * Copyright (c) 2002, 2003, Arjuna Technologies Limited.
- *
- * WSTXTestRunnerServlet.java
- */
-
-package com.arjuna.qa.junit;
-
-import junit.framework.AssertionFailedError;
-import junit.framework.Test;
-import junit.framework.TestListener;
-import junit.framework.TestResult;
-import junit.framework.TestSuite;
-
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.CharArrayWriter;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-
-public class WSASTestRunnerServlet extends HttpServlet
-{
- public void init(ServletConfig config) throws ServletException
- {
- super.init(config);
-
- _testSuiteClassName = config.getInitParameter("TestSuiteClassName");
- }
-
- protected String getContentType()
- {
- return "text/html";
- }
-
- public void doGet(HttpServletRequest request, HttpServletResponse response)
- throws ServletException, IOException
- {
- try
- {
- PrintWriter writer = response.getWriter();
-
- response.setContentType(getContentType());
- response.setHeader("Cache-Control", "no-cache");
-
- if (request.getParameter("failednumber") != null)
- doStatusFailed(writer, request, response);
- else if (request.getParameter("errornumber") != null)
- doStatusError(writer, request, response);
- else
- doStatus(writer, request, response);
- }
- catch (Exception exception)
- {
- log("Test Runner: doGet failed", exception);
-
- response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, exception.toString());
- }
- catch (Error error)
- {
- log("Test Runner: doGet failed", error);
-
- response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, error.toString());
- }
- }
-
- public void doPost(HttpServletRequest request, HttpServletResponse response)
- throws ServletException, IOException
- {
- try
- {
- PrintWriter writer = response.getWriter();
-
- response.setContentType(getContentType());
- response.setHeader("Cache-Control", "no-cache");
-
- if ((_runnerThread == null) || (! _runnerThread.isAlive()))
- {
- _runnerThread = new RunnerThread();
- _runnerThread.start();
- }
-
- if (request.getParameter("failednumber") != null)
- doStatusFailed(writer, request, response);
- else if (request.getParameter("errornumber") != null)
- doStatusError(writer, request, response);
- else
- doStatus(writer, request, response);
- }
- catch (Exception exception)
- {
- log("Test Runner: doPost failed", exception);
-
- response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, exception.toString());
- }
- catch (Error error)
- {
- log("Test Runner: doPost failed", error);
-
- response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, error.toString());
- }
- }
-
- public void doStatus(PrintWriter writer, HttpServletRequest request, HttpServletResponse response)
- throws ServletException
- {
- writer.println("<HTML>");
- writer.println("<HEAD>");
- writer.println("<TITLE>Test Runner</TITLE>");
- writer.println("</HEAD>");
- writer.println("<BODY bgcolor=\"white\" style=\"font-family: Arial, Helvetica, sans-serif\">");
- writer.println("<DIV style=\"font-family: Arial, Helvetica, sans-serif; font-size: large\"> <BR>Test Runner: Status<BR> </DIV>");
-
- writer.println("<TABLE width=\"100%\">");
-
- writer.println("<TR><TD colspan=\"3\" align=\"center\" style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Status</TD></TR>");
- writer.println("<TR>");
- writer.println("<TD style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Test suite class:</TD>");
- writer.println("<TD style=\"font-family: Arial, Helvetica, sans-serif\">" + _testSuiteClassName + "</TD>");
- writer.println("</TR>");
-
- if ((_runnerThread == null) || (! _runnerThread.isAlive()))
- {
- writer.println("<TR>");
- writer.println("<TD style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Action:</TD>");
- writer.print("<TD style=\"font-family: Arial, Helvetica, sans-serif\">");
- writer.print("<FORM method=\"POST\" action=\"" + request.getRequestURL() + "\">");
- writer.print("<INPUT type=\"button\" value=\"run\" onclick=\"this.form.submit()\">");
- writer.print("</FORM>");
- writer.println("</TD>");
- writer.println("</TR>");
- }
- else
- {
- writer.println("<TR>");
- writer.println("<TD style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Action:</TD>");
- writer.print("<TD style=\"font-family: Arial, Helvetica, sans-serif\">");
- writer.print("<FORM method=\"GET\" action=\"" + request.getRequestURL() + "\">");
- writer.print("<INPUT type=\"button\" value=\"reload\" onclick=\"this.form.submit()\">");
- writer.print("</FORM>");
- writer.println("</TD>");
- writer.println("</TR>");
-
- if (_currentTest != null)
- {
- writer.println("<TR>");
- writer.println("<TD style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Current test:</TD>");
- writer.print("<TD style=\"font-family: Arial, Helvetica, sans-serif\">");
- encode(writer, _currentTest.toString());
- writer.println("</TD>");
- writer.println("</TR>");
- }
- }
- writer.println("</TR>");
- writer.println("<TR>");
- writer.println("<TD style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Passed count:</TD>");
- writer.println("<TD style=\"font-family: Arial, Helvetica, sans-serif\">" + _passedTests.size() + "</TD>");
- writer.println("</TR>");
- writer.println("<TR>");
- writer.println("<TD style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Failed count:</TD>");
- writer.println("<TD style=\"font-family: Arial, Helvetica, sans-serif\">" + _failedTests.size() + "</TD>");
- writer.println("</TR>");
- writer.println("<TR>");
- writer.println("<TD style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Error count:</TD>");
- writer.println("<TD style=\"font-family: Arial, Helvetica, sans-serif\">" + _errorTests.size() + "</TD>");
- writer.println("</TR>");
-
- writer.println("</TABLE>");
-
- if (! _passedTests.isEmpty())
- {
- writer.println("<BR>");
-
- writer.println("<TABLE width=\"100%\">");
-
- writer.println("<TR><TD colspan=\"3\" align=\"center\" style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Passes</TD></TR>");
-
- writer.println("<TR>");
- writer.println("<TD align=\"center\" style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Test</TD>");
- writer.println("<TD align=\"center\" style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Duration</TD>");
- writer.println("</TR>");
-
- Iterator passedTestsIterator = _passedTests.iterator();
- while (passedTestsIterator.hasNext())
- {
- PassedTest passedTest = (PassedTest) passedTestsIterator.next();
- writer.println("<TR>");
- writer.print("<TD style=\"font-family: Arial, Helvetica, sans-serif\">");
- encode(writer, passedTest.test.toString());
- writer.println("</TD>");
- writer.print("<TD align=\"center\" style=\"font-family: Arial, Helvetica, sans-serif\">" + passedTest.duration + " ms</TD>");
- writer.println("</TR>");
- }
-
- writer.println("</TABLE>");
- }
-
- if (! _failedTests.isEmpty())
- {
- writer.println("<BR>");
-
- writer.println("<TABLE width=\"100%\">");
-
- writer.println("<TR><TD colspan=\"3\" align=\"center\" style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Failures</TD></TR>");
- writer.println("<TR>");
- writer.println("<TD align=\"center\" style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Test</TD>");
- writer.println("<TD align=\"center\" style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Duration</TD>");
- writer.println("<TD align=\"center\" style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Message</TD>");
- writer.println("</TR>");
-
- int failedNumber = 0;
- Iterator failedTestsIterator = _failedTests.iterator();
- while (failedTestsIterator.hasNext())
- {
- FailedTest failedTest = (FailedTest) failedTestsIterator.next();
- writer.println("<TR>");
- writer.print("<TD style=\"font-family: Arial, Helvetica, sans-serif\">");
- writer.print("<A href=\"" + request.getRequestURL() + "?failednumber=" + failedNumber + "\">");
- encode(writer, failedTest.test.toString());
- writer.print("</A>");
- writer.println("</TD>");
- writer.print("<TD align=\"center\" style=\"font-family: Arial, Helvetica, sans-serif\">" + failedTest.duration + " ms</TD>");
- writer.print("<TD style=\"font-family: Arial, Helvetica, sans-serif\">");
- encode(writer, failedTest.assertionFailedError.getMessage());
- writer.println("</TD>");
- writer.println("</TR>");
- failedNumber++;
- }
-
- writer.println("</TABLE>");
-
- writer.println("<BR>");
- }
-
- if (! _errorTests.isEmpty())
- {
- writer.println("<TABLE width=\"100%\">");
- writer.println("<TR>");
- writer.println("<TR><TD colspan=\"3\" align=\"center\" style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Errors</TD></TR>");
- writer.println("<TD align=\"center\" style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Test</TD>");
- writer.println("<TD align=\"center\" style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Duration</TD>");
- writer.println("<TD align=\"center\" style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Exception/Error</TD>");
- writer.println("</TR>");
-
- int errorNumber = 0;
- Iterator errorTestsIterator = _errorTests.iterator();
- while (errorTestsIterator.hasNext())
- {
- ErrorTest errorTest = (ErrorTest) errorTestsIterator.next();
- writer.println("<TR>");
- writer.print("<TD style=\"font-family: Arial, Helvetica, sans-serif\">");
- writer.print("<A href=\"" + request.getRequestURL() + "?errornumber=" + errorNumber + "\">");
- encode(writer, errorTest.test.toString());
- writer.print("</A>");
- writer.println("</TD>");
- writer.print("<TD align=\"center\" style=\"font-family: Arial, Helvetica, sans-serif\">" + errorTest.duration + " ms</TD>");
- writer.print("<TD style=\"font-family: Arial, Helvetica, sans-serif\">");
- encode(writer, errorTest.throwable.toString());
- writer.println("</TD>");
- writer.println("</TR>");
- errorNumber++;
- }
-
- writer.println("</TABLE>");
- }
-
- writer.println("</BODY>");
- writer.println("</HTML>");
- }
-
- public void doStatusFailed(PrintWriter writer, HttpServletRequest request, HttpServletResponse response)
- throws ServletException
- {
- int failedIndex = 0;
- FailedTest failedTest = null;
-
- try
- {
- String failedIndexString = (String) request.getParameter("failednumber");
-
- failedIndex = Integer.parseInt(failedIndexString);
- failedTest = (FailedTest) _failedTests.get(failedIndex);
- }
- catch (Exception exception)
- {
- failedTest = null;
- }
-
- if (failedTest != null)
- {
- writer.println("<HTML>");
- writer.println("<HEAD>");
- writer.println("<TITLE>Test Runner</TITLE>");
- writer.println("</HEAD>");
- writer.println("<BODY bgcolor=\"white\" style=\"font-family: Arial, Helvetica, sans-serif\">");
- writer.println("<DIV style=\"font-family: Arial, Helvetica, sans-serif; font-size: large\"> <BR>Test Runner: Failed Status<BR> </DIV>");
-
- writer.println("<TABLE>");
-
- writer.print("<TR>");
- writer.print("<TD style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Test:</TD>");
- writer.print("<TD style=\"font-family: Arial, Helvetica, sans-serif\">");
- encode(writer, failedTest.test.toString());
- writer.println("</TD>");
- writer.println("</TR>");
-
- writer.println("<TR>");
- writer.print("<TD style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Duration:</TD>");
- writer.print("<TD style=\"font-family: Arial, Helvetica, sans-serif\">" + failedTest.duration + " ms</TD>");
- writer.println("</TR>");
-
- writer.println("<TR>");
- writer.print("<TD style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Message:</TD>");
- writer.print("<TD style=\"font-family: Arial, Helvetica, sans-serif\">");
- encode(writer, failedTest.assertionFailedError.getMessage());
- writer.println("</TD>");
- writer.println("</TR>");
-
- writer.print("<TR>");
- writer.print("<TD colspan=\"2\" style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Stack trace:</TD>");
- writer.println("</TR>");
- writer.println("<TR>");
- writer.println("<TD colspan=\"2\" style=\"font-family: Arial, Helvetica, sans-serif\">");
- writer.println("<PRE>");
- CharArrayWriter charArrayWriter = new CharArrayWriter();
- PrintWriter printWriter = new PrintWriter(charArrayWriter, true);
- failedTest.assertionFailedError.printStackTrace(printWriter);
- printWriter.close();
- charArrayWriter.close();
- encode(writer, charArrayWriter.toString());
- writer.println("</PRE>");
- writer.println("</TD>");
- writer.println("</TR>");
-
- writer.println("</TABLE>");
-
- writer.println("<TABLE width=\"100%\">");
- writer.println("<TR>");
- writer.println("<TD align=\"left\" width=\"33%\" style=\"font-family: Arial, Helvetica, sans-serif\">");
- if (failedIndex > 0)
- writer.println("<A href=\"" + request.getRequestURL() + "?failednumber=" + (failedIndex - 1)+ "\">previous</A>");
- else
- writer.print(" ");
- writer.println("</TD>");
- writer.println("<TD align=\"center\" width=\"33%\" style=\"font-family: Arial, Helvetica, sans-serif\">");
- writer.println("<A href=\"" + request.getRequestURL() + "\">all</A>");
- writer.println("</TD>");
- writer.println("<TD align=\"right\" width=\"33%\" style=\"font-family: Arial, Helvetica, sans-serif\">");
- if (failedIndex < (_failedTests.size() - 1))
- writer.println("<A href=\"" + request.getRequestURL() + "?failednumber=" + (failedIndex + 1)+ "\">next</A>");
- else
- writer.print(" ");
- writer.println("</TD>");
- writer.println("</TR>");
- writer.println("</TABLE>");
-
- writer.println("</BODY>");
- writer.println("</HTML>");
- }
- else
- doStatus(writer, request, response);
- }
-
- public void doStatusError(PrintWriter writer, HttpServletRequest request, HttpServletResponse response)
- throws ServletException
- {
- int errorIndex = 0;
- ErrorTest errorTest = null;
-
- try
- {
- String errorIndexString = (String) request.getParameter("errornumber");
-
- errorIndex = Integer.parseInt(errorIndexString);
- errorTest = (ErrorTest) _errorTests.get(errorIndex);
- }
- catch (Exception exception)
- {
- errorTest = null;
- }
-
- if (errorTest != null)
- {
- writer.println("<HTML>");
- writer.println("<HEAD>");
- writer.println("<TITLE>Test Runner</TITLE>");
- writer.println("</HEAD>");
- writer.println("<BODY bgcolor=\"white\" style=\"font-family: Arial, Helvetica, sans-serif\">");
- writer.println("<DIV style=\"font-family: Arial, Helvetica, sans-serif; font-size: large\"> <BR>Test Runner: Error Status<BR> </DIV>");
-
- writer.println("<TABLE>");
-
- writer.print("<TR>");
- writer.print("<TD style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Test:</TD>");
- writer.print("<TD style=\"font-family: Arial, Helvetica, sans-serif\">");
- encode(writer, errorTest.test.toString());
- writer.println("</TD>");
- writer.println("</TR>");
-
- writer.println("<TR>");
- writer.print("<TD style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Duration:</TD>");
- writer.print("<TD style=\"font-family: Arial, Helvetica, sans-serif\">" + errorTest.duration + " ms</TD>");
- writer.println("</TR>");
-
- writer.println("<TR>");
- writer.print("<TD style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Exception/error:</TD>");
- writer.print("<TD style=\"font-family: Arial, Helvetica, sans-serif\">");
- encode(writer, errorTest.throwable.toString());
- writer.println("</TD>");
- writer.println("</TR>");
-
- writer.print("<TR>");
- writer.print("<TD colspan=\"2\" style=\"font-family: Arial, Helvetica, sans-serif; font-weight: bold\">Stack trace:</TD>");
- writer.println("</TR>");
- writer.println("<TR>");
- writer.println("<TD colspan=\"2\" style=\"font-family: Arial, Helvetica, sans-serif\">");
- writer.println("<PRE>");
- CharArrayWriter charArrayWriter = new CharArrayWriter();
- PrintWriter printWriter = new PrintWriter(charArrayWriter, true);
- errorTest.throwable.printStackTrace(printWriter);
- printWriter.close();
- charArrayWriter.close();
- encode(writer, charArrayWriter.toString());
- writer.println("</PRE>");
- writer.println("</TD>");
- writer.println("</TR>");
-
- writer.println("</TABLE>");
-
- writer.println("<TABLE width=\"100%\">");
- writer.println("<TR>");
- writer.println("<TD align=\"left\" width=\"33%\" style=\"font-family: Arial, Helvetica, sans-serif\">");
- if (errorIndex > 0)
- writer.println("<A href=\"" + request.getRequestURL() + "?errornumber=" + (errorIndex - 1)+ "\">previous</A>");
- else
- writer.print(" ");
- writer.println("</TD>");
- writer.println("<TD align=\"center\" width=\"33%\" style=\"font-family: Arial, Helvetica, sans-serif\">");
- writer.println("<A href=\"" + request.getRequestURL() + "\">all</A>");
- writer.println("</TD>");
- writer.println("<TD align=\"right\" width=\"33%\" style=\"font-family: Arial, Helvetica, sans-serif\">");
- if (errorIndex < (_errorTests.size() - 1))
- writer.println("<A href=\"" + request.getRequestURL() + "?errornumber=" + (errorIndex + 1)+ "\">next</A>");
- else
- writer.print(" ");
- writer.println("</TD>");
- writer.println("</TR>");
- writer.println("</TABLE>");
-
- writer.println("</BODY>");
- writer.println("</HTML>");
- }
- else
- doStatus(writer, request, response);
- }
-
- protected class PassedTest
- {
- public Test test;
- public long duration;
- }
-
- protected class FailedTest
- {
- public Test test;
- public long duration;
- public AssertionFailedError assertionFailedError;
- }
-
- protected class ErrorTest
- {
- public Test test;
- public long duration;
- public Throwable throwable;
- }
-
- protected class RunnerThread extends Thread
- {
- public void run()
- {
- try
- {
- _passedTests.clear();
- _failedTests.clear();
- _errorTests.clear();
-
- Class testSuiteClass = Class.forName(_testSuiteClassName);
- TestListener testListener = new BasicTestListener();
-
- _testResult = new TestResult();
- _testSuite = (TestSuite) testSuiteClass.newInstance();
-
- _testResult.addListener(testListener);
- _testSuite.run(_testResult);
- _testResult.removeListener(testListener);
- }
- catch (Exception exception)
- {
- log("Runner Thread: run failed", exception);
- }
- catch (Error error)
- {
- log("Runner Thread: run failed", error);
- }
- }
- }
-
- protected class BasicTestListener implements TestListener
- {
- public void startTest(Test test)
- {
- _startTime = System.currentTimeMillis();
- _failed = false;
- _error = false;
- _assertionFailedError = null;
- _throwable = null;
- _currentTest = test;
- }
-
- public void addError(Test test, Throwable throwable)
- {
- _error = true;
- _throwable = throwable;
- throwable.printStackTrace(System.out);
- }
-
- public void addFailure(Test test, AssertionFailedError assertionFailedError)
- {
- _failed = true;
- _assertionFailedError = assertionFailedError;
- assertionFailedError.printStackTrace(System.out);
- }
-
- public void endTest(Test test)
- {
- if (_failed)
- {
- FailedTest failedTest = new FailedTest();
- failedTest.test = test;
- failedTest.duration = System.currentTimeMillis() - _startTime;
- failedTest.assertionFailedError = _assertionFailedError;
- _failedTests.add(failedTest);
- }
- else if (_error)
- {
- ErrorTest errorTest = new ErrorTest();
- errorTest.test = test;
- errorTest.duration = System.currentTimeMillis() - _startTime;
- errorTest.throwable = _throwable;
- _errorTests.add(errorTest);
- }
- else
- {
- PassedTest passedTest = new PassedTest();
- passedTest.test = test;
- passedTest.duration = System.currentTimeMillis() - _startTime;
- _passedTests.add(passedTest);
- }
-
- _currentTest = null;
- }
-
- private long _startTime = 0;
- private boolean _failed = false;
- private boolean _error = false;
- private AssertionFailedError _assertionFailedError = null;
- private Throwable _throwable = null;
- }
-
- private static void encode(PrintWriter writer, String string)
- {
- if (string != null)
- {
- char[] chars = string.toCharArray();
-
- for (int index = 0; index < chars.length; index++)
- if (chars[index] == '<')
- writer.print("<");
- else if (chars[index] == '>')
- writer.print(">");
- else if (chars[index] == '&')
- writer.print("&");
- else
- writer.print(chars[index]);
- }
- else
- writer.print("null");
- }
-
- protected List _passedTests = new LinkedList();
- protected List _failedTests = new LinkedList();
- protected List _errorTests = new LinkedList();
- protected Test _currentTest = null;
- protected String _testSuiteClassName = null;
- protected RunnerThread _runnerThread = null;
- protected TestResult _testResult = null;
- private TestSuite _testSuite = null;
-
-}
\ No newline at end of file
Deleted: labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/qa/junit/WSASTestRunnerXMLServlet.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/qa/junit/WSASTestRunnerXMLServlet.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/qa/junit/WSASTestRunnerXMLServlet.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -1,209 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags.
- * See the copyright.txt in the distribution for a full listing
- * of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2005-2006,
- * @author JBoss Inc.
- */
-package com.arjuna.qa.junit;
-
-import org.dom4j.dom.DOMDocument;
-import org.dom4j.dom.DOMElement;
-import org.dom4j.io.OutputFormat;
-import org.dom4j.io.XMLWriter;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.CharArrayWriter;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.Date;
-import java.util.Iterator;
-
-/**
- * @author <a href="mailto:istudens at redhat.com">Ivo Studensky</a>
- * @version $Revision$
- */
-public class WSASTestRunnerXMLServlet extends WSASTestRunnerServlet
-{
-
- @Override
- protected String getContentType()
- {
- return "text/xml";
- }
-
- @Override
- public void doStatus(PrintWriter writer, HttpServletRequest request, HttpServletResponse response)
- throws ServletException
- {
-
- DOMDocument report = new DOMDocument();
- DOMElement testsuite = new DOMElement("testsuite");
- report.setRootElement(testsuite);
- testsuite.addAttribute("name", _testSuiteClassName);
- testsuite.addAttribute("errors", Integer.toString(_errorTests.size()));
- testsuite.addAttribute("failures", Integer.toString(_failedTests.size()));
- testsuite.addAttribute("hostname", request.getServerName());
- testsuite.addAttribute("tests", Integer.toString((_testResult != null) ? _testResult.runCount() : 0));
- testsuite.addAttribute("timestamp", new Date().toString());
-
- DOMElement properties = new DOMElement("properties");
- testsuite.add(properties);
- DOMElement status = newPropertyDOMElement("status");
- properties.add(status);
- if ((_runnerThread == null) || (! _runnerThread.isAlive()))
- {
- if (_passedTests.isEmpty() && _failedTests.isEmpty() && _errorTests.isEmpty())
- {
- status.addAttribute("value", "stopped");
- }
- else
- {
- status.addAttribute("value", "finished");
- }
- }
- else if (_currentTest != null)
- {
- status.addAttribute("value", "running");
- properties.add(newPropertyDOMElement("current-test", _currentTest.toString()));
- }
-
- long totalDuration = 0;
-
- if (! _passedTests.isEmpty())
- {
- Iterator passedTestsIterator = _passedTests.iterator();
- while (passedTestsIterator.hasNext())
- {
- PassedTest passedTest = (PassedTest) passedTestsIterator.next();
- totalDuration += passedTest.duration;
-
- testsuite.add(newTestcase(
- passedTest.test.getClass().getName(), passedTest.test.toString(), passedTest.duration));
- }
- }
-
- if (! _failedTests.isEmpty())
- {
- Iterator failedTestsIterator = _failedTests.iterator();
- while (failedTestsIterator.hasNext())
- {
- FailedTest failedTest = (FailedTest) failedTestsIterator.next();
- totalDuration += failedTest.duration;
-
- CharArrayWriter charArrayWriter = new CharArrayWriter();
- PrintWriter printWriter = new PrintWriter(charArrayWriter, true);
- failedTest.assertionFailedError.printStackTrace(printWriter);
- printWriter.close();
- charArrayWriter.close();
-
- testsuite.add(newFailedTestcase(
- failedTest.test.getClass().getName(), failedTest.test.toString(), failedTest.duration,
- failedTest.assertionFailedError.getMessage(), charArrayWriter.toString()));
- }
- }
-
- if (! _errorTests.isEmpty())
- {
- Iterator errorTestsIterator = _errorTests.iterator();
- while (errorTestsIterator.hasNext())
- {
- ErrorTest errorTest = (ErrorTest) errorTestsIterator.next();
- totalDuration += errorTest.duration;
-
- CharArrayWriter charArrayWriter = new CharArrayWriter();
- PrintWriter printWriter = new PrintWriter(charArrayWriter, true);
- errorTest.throwable.printStackTrace(printWriter);
- printWriter.close();
- charArrayWriter.close();
-
- System.out.println("charArrayWriter.toString()=" + charArrayWriter.toString());
- testsuite.add(newErrorTestcase(
- errorTest.test.getClass().getName(), errorTest.test.toString(), errorTest.duration,
- errorTest.throwable.getMessage(), charArrayWriter.toString()));
- }
- }
- testsuite.add(new DOMElement("system-out").addCDATA(""));
- testsuite.add(new DOMElement("system-err").addCDATA(""));
- // total time of all tests
- testsuite.addAttribute("time", Float.toString(totalDuration / 1000f));
-
- XMLWriter outputter = new XMLWriter(writer, OutputFormat.createPrettyPrint());
- try {
- outputter.write(testsuite);
- outputter.close();
- } catch (IOException e) {
- throw new ServletException(e);
- }
- }
-
- private DOMElement newPropertyDOMElement(String name)
- {
- return newPropertyDOMElement(name, null);
- }
-
- private DOMElement newPropertyDOMElement(String name, String value)
- {
- DOMElement property = new DOMElement("property");
- property.addAttribute("name", name);
- if (value != null)
- {
- property.addAttribute("value", value);
- }
- return property;
- }
-
- private DOMElement newTestcase(String classname, String name, long duration)
- {
- return newTestcase(classname, name, duration, null, null, null);
- }
-
- private DOMElement newFailedTestcase(String classname, String name, long duration, String failureMessage, String failureDetail)
- {
- return newTestcase(classname, name, duration, "junit.framework.AssertionFailedError", failureMessage, failureDetail);
- }
-
- private DOMElement newErrorTestcase(String classname, String name, long duration, String failureMessage, String failureDetail)
- {
- return newTestcase(classname, name, duration, "junit.framework.throwable", failureMessage, failureDetail);
- }
-
- private DOMElement newTestcase(String classname, String name, long duration, String failureMessage, String failureType, String failureDetail)
- {
- DOMElement testcase = new DOMElement("testcase");
- testcase.addAttribute("classname", classname);
- testcase.addAttribute("name", name);
- testcase.addAttribute("time", Float.toString(duration / 1000f)); // converts from miliseconds to seconds
- if (failureMessage != null)
- {
- DOMElement failure = new DOMElement("failure");
- testcase.add(failure);
- failure.addAttribute("message", failureMessage);
- if (failureType != null)
- {
- failure.addAttribute("type", failureType);
- }
- if (failureDetail != null)
- {
- failure.addCDATA(failureDetail);
- }
- }
- return testcase;
- }
-
-}
\ No newline at end of file
Modified: labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/WSASTestSuite.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/WSASTestSuite.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/WSASTestSuite.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -24,23 +24,24 @@
package com.arjuna.wsas.tests;
-public class WSASTestSuite extends junit.framework.TestSuite
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+ at RunWith(Suite.class)
+ @Suite.SuiteClasses({
+ com.arjuna.wsas.tests.junit.basic.Context.class,
+ com.arjuna.wsas.tests.junit.basic.Hierarchy.class,
+ com.arjuna.wsas.tests.junit.basic.NestedActivity.class,
+ com.arjuna.wsas.tests.junit.basic.NullEnd.class,
+ com.arjuna.wsas.tests.junit.basic.Resume.class,
+ com.arjuna.wsas.tests.junit.basic.StartEnd.class,
+ com.arjuna.wsas.tests.junit.basic.StatusCheck.class,
+ com.arjuna.wsas.tests.junit.basic.Suspend.class,
+ com.arjuna.wsas.tests.junit.basic.Timeout.class,
+ com.arjuna.wsas.tests.junit.hls.Context1.class,
+ com.arjuna.wsas.tests.junit.hls.Context2.class,
+ com.arjuna.wsas.tests.junit.hls.Service.class
+ })
+public class WSASTestSuite
{
- public WSASTestSuite()
- {
- // wsas basic tests
- addTest(new junit.framework.TestSuite(com.arjuna.wsas.tests.junit.basic.Context.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wsas.tests.junit.basic.Hierarchy.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wsas.tests.junit.basic.NestedActivity.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wsas.tests.junit.basic.NullEnd.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wsas.tests.junit.basic.Resume.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wsas.tests.junit.basic.StartEnd.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wsas.tests.junit.basic.StatusCheck.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wsas.tests.junit.basic.Suspend.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wsas.tests.junit.basic.Timeout.class));
- // wsas hls tests
- addTest(new junit.framework.TestSuite(com.arjuna.wsas.tests.junit.hls.Context1.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wsas.tests.junit.hls.Context2.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wsas.tests.junit.hls.Service.class));
- }
}
\ No newline at end of file
Modified: labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/basic/Context.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/basic/Context.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/basic/Context.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -39,7 +39,10 @@
import com.arjuna.mw.wsas.context.ContextManager;
import com.arjuna.wsas.tests.WSASTestUtils;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -47,10 +50,11 @@
* @since 1.0.
*/
-public class Context extends TestCase
+public class Context
{
- public static void testContext()
+ @Test
+ public void testContext()
throws Exception
{
UserActivity ua = UserActivityFactory.userActivity();
Modified: labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/basic/Hierarchy.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/basic/Hierarchy.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/basic/Hierarchy.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -37,7 +37,10 @@
import com.arjuna.mw.wsas.activity.ActivityHierarchy;
import com.arjuna.wsas.tests.WSASTestUtils;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -45,10 +48,11 @@
* @since 1.0.
*/
-public class Hierarchy extends TestCase
+public class Hierarchy
{
- public static void testHierarchy()
+ @Test
+ public void testHierarchy()
throws Exception
{
UserActivity ua = UserActivityFactory.userActivity();
Modified: labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/basic/NestedActivity.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/basic/NestedActivity.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/basic/NestedActivity.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -36,7 +36,10 @@
import com.arjuna.mw.wsas.exceptions.NoActivityException;
import com.arjuna.wsas.tests.WSASTestUtils;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -44,10 +47,11 @@
* @since 1.0.
*/
-public class NestedActivity extends TestCase
+public class NestedActivity
{
- public static void testNestedActivity()
+ @Test
+ public void testNestedActivity()
throws Exception
{
UserActivity ua = UserActivityFactory.userActivity();
Modified: labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/basic/NullEnd.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/basic/NullEnd.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/basic/NullEnd.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -36,7 +36,10 @@
import com.arjuna.mw.wsas.exceptions.NoActivityException;
import com.arjuna.wsas.tests.WSASTestUtils;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -44,10 +47,11 @@
* @since 1.0.
*/
-public class NullEnd extends TestCase
+public class NullEnd
{
- public static void testNullEnd()
+ @Test
+ public void testNullEnd()
throws Exception
{
UserActivity ua = UserActivityFactory.userActivity();
Modified: labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/basic/Resume.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/basic/Resume.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/basic/Resume.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -39,7 +39,10 @@
import com.arjuna.mw.wsas.common.GlobalId;
import com.arjuna.wsas.tests.WSASTestUtils;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -47,10 +50,11 @@
* @since 1.0.
*/
-public class Resume extends TestCase
+public class Resume
{
- public static void testResume()
+ @Test
+ public void testResume()
throws Exception
{
UserActivity ua = UserActivityFactory.userActivity();
Modified: labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/basic/StartEnd.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/basic/StartEnd.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/basic/StartEnd.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -34,7 +34,10 @@
import com.arjuna.mw.wsas.UserActivity;
import com.arjuna.mw.wsas.UserActivityFactory;
import com.arjuna.wsas.tests.WSASTestUtils;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -42,10 +45,11 @@
* @since 1.0.
*/
-public class StartEnd extends TestCase
+public class StartEnd
{
- public static void testStartEnd()
+ @Test
+ public void testStartEnd()
throws Exception
{
UserActivity ua = UserActivityFactory.userActivity();
Modified: labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/basic/StatusCheck.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/basic/StatusCheck.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/basic/StatusCheck.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -40,7 +40,10 @@
import com.arjuna.mw.wsas.status.Active;
import com.arjuna.mw.wsas.completionstatus.Failure;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -48,10 +51,11 @@
* @since 1.0.
*/
-public class StatusCheck extends TestCase
+public class StatusCheck
{
- public static void testStatusCheck()
+ @Test
+ public void testStatusCheck()
throws Exception
{
UserActivity ua = UserActivityFactory.userActivity();
Modified: labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/basic/Suspend.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/basic/Suspend.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/basic/Suspend.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -38,7 +38,10 @@
import com.arjuna.mw.wsas.exceptions.NoActivityException;
import com.arjuna.wsas.tests.WSASTestUtils;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -46,10 +49,11 @@
* @since 1.0.
*/
-public class Suspend extends TestCase
+public class Suspend
{
- public static void testSuspend()
+ @Test
+ public void testSuspend()
throws Exception
{
UserActivity ua = UserActivityFactory.userActivity();
Modified: labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/basic/Timeout.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/basic/Timeout.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/basic/Timeout.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -38,7 +38,10 @@
import com.arjuna.mw.wsas.completionstatus.*;
import com.arjuna.wsas.tests.WSASTestUtils;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -46,10 +49,11 @@
* @since 1.0.
*/
-public class Timeout extends TestCase
+public class Timeout
{
- public static void testTimeout()
+ @Test
+ public void testTimeout()
throws Exception
{
UserActivity ua = UserActivityFactory.userActivity();
Modified: labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/hls/Context1.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/hls/Context1.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/hls/Context1.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -47,7 +47,10 @@
import com.arjuna.wsas.tests.DemoHLS;
import com.arjuna.wsas.tests.WSASTestUtils;
import com.arjuna.wsas.tests.DemoSOAPContextImple;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -55,10 +58,11 @@
* @since 1.0.
*/
-public class Context1 extends TestCase
+public class Context1
{
- public static void testContext1()
+ @Test
+ public void testContext1()
throws Exception
{
UserActivity ua = UserActivityFactory.userActivity();
Modified: labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/hls/Context2.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/hls/Context2.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/hls/Context2.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -48,7 +48,10 @@
import com.arjuna.wsas.tests.FailureHLS;
import com.arjuna.wsas.tests.WSASTestUtils;
import com.arjuna.wsas.tests.DemoSOAPContextImple;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -56,10 +59,11 @@
* @since 1.0.
*/
-public class Context2 extends TestCase
+public class Context2
{
- public static void testContext2()
+ @Test
+ public void testContext2()
throws Exception
{
UserActivity ua = UserActivityFactory.userActivity();
Modified: labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/hls/Service.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/hls/Service.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSAS/tests/classes/com/arjuna/wsas/tests/junit/hls/Service.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -37,18 +37,23 @@
import com.arjuna.wsas.tests.DemoHLS;
import com.arjuna.wsas.tests.WSASTestUtils;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
/**
* @author Mark Little (mark.little at arjuna.com)
* @version $Id: Service.java,v 1.1 2002/11/25 10:51:47 nmcl Exp $
* @since 1.0.
*/
-public class Service extends TestCase
+public class Service
{
- public static void testService()
+ @Test
+ public void testService()
throws Exception
{
UserActivity ua = UserActivityFactory.userActivity();
Modified: labs/jbosstm/trunk/XTS/WSAS/tests/dd/wsas-tests_application.xml
===================================================================
--- labs/jbosstm/trunk/XTS/WSAS/tests/dd/wsas-tests_application.xml 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSAS/tests/dd/wsas-tests_application.xml 2010-03-01 16:40:31 UTC (rev 31894)
@@ -34,6 +34,12 @@
</web>
</module>
<module>
+ <java>wsas-tests.jar</java>
+ </module>
+ <module>
+ <java>xts-test-servlet.jar</java>
+ </module>
+ <module>
<java>junit.jar</java>
</module>
</application>
Modified: labs/jbosstm/trunk/XTS/WSAS/tests/dd/wsas-tests_web-app.xml
===================================================================
--- labs/jbosstm/trunk/XTS/WSAS/tests/dd/wsas-tests_web-app.xml 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSAS/tests/dd/wsas-tests_web-app.xml 2010-03-01 16:40:31 UTC (rev 31894)
@@ -34,7 +34,7 @@
<servlet>
<servlet-name>JUnitTestsServlet</servlet-name>
- <servlet-class>com.arjuna.qa.junit.WSASTestRunnerServlet</servlet-class>
+ <servlet-class>com.arjuna.qa.junit.TestRunnerServlet</servlet-class>
<init-param>
<param-name>TestSuiteClassName</param-name>
<param-value>com.arjuna.wsas.tests.WSASTestSuite</param-value>
@@ -44,7 +44,7 @@
<servlet>
<servlet-name>JUnitTestsXMLServlet</servlet-name>
- <servlet-class>com.arjuna.qa.junit.WSASTestRunnerXMLServlet</servlet-class>
+ <servlet-class>com.arjuna.qa.junit.TestRunnerXMLServlet</servlet-class>
<init-param>
<param-name>TestSuiteClassName</param-name>
<param-value>com.arjuna.wsas.tests.WSASTestSuite</param-value>
Modified: labs/jbosstm/trunk/XTS/WSCF/build.xml
===================================================================
--- labs/jbosstm/trunk/XTS/WSCF/build.xml 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSCF/build.xml 2010-03-01 16:40:31 UTC (rev 31894)
@@ -57,6 +57,7 @@
<!--sibling module directories and jars -->
<property name="wsas.jar.dest" value="../WSAS/build/lib"/>
+ <property name="wsas.tests.build.lib.dir" value="../WSAS/tests/build/lib"/>
<property name="wsc.jar.dest" value="../WS-C/build/dev/lib"/>
<property name="wsas.libs" value="wsas.jar"/>
@@ -308,6 +309,7 @@
-->
<fileset dir="${xts.ext.dir}" includes="${tests.libs}"/>
<fileset dir="${wscf.tests.webapps.dest}" includes="wscf-tests.war wscf11-tests.war wscf-tests.jar"/>
+ <fileset dir="${wsas.tests.build.lib.dir}" includes="xts-test-servlet.jar"/>
</ear>
</target>
@@ -326,6 +328,7 @@
-->
<fileset dir="${xts.ext.dir}" includes="${tests.libs}"/>
<fileset dir="${wscf.tests.webapps.dest}" includes="wscf11-tests.war wscf-tests.jar"/>
+ <fileset dir="${wsas.tests.build.lib.dir}" includes="xts-test-servlet.jar"/>
</ear>
</target>
Modified: labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/WSCFTestSuite.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/WSCFTestSuite.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/WSCFTestSuite.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -24,29 +24,24 @@
package com.arjuna.wscf.tests;
-public class WSCFTestSuite extends junit.framework.TestSuite
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+ at RunWith(Suite.class)
+ @Suite.SuiteClasses({
+ com.arjuna.wscf.tests.junit.model.twophase.StartEnd.class,
+ com.arjuna.wscf.tests.junit.model.twophase.BeginConfirm.class,
+ com.arjuna.wscf.tests.junit.model.twophase.BeginCancel.class,
+ com.arjuna.wscf.tests.junit.model.twophase.Suspend.class,
+ com.arjuna.wscf.tests.junit.model.twophase.SuspendResume.class,
+ com.arjuna.wscf.tests.junit.model.twophase.SuspendConfirm.class,
+ com.arjuna.wscf.tests.junit.model.twophase.CancelOnlyCancel.class,
+ com.arjuna.wscf.tests.junit.model.twophase.CancelOnlyConfirm.class,
+ com.arjuna.wscf.tests.junit.model.twophase.AddParticipant.class,
+ com.arjuna.wscf.tests.junit.model.twophase.SuspendParticipant.class,
+ com.arjuna.wscf.tests.junit.model.twophase.AddSynchronization.class,
+ com.arjuna.wscf.tests.junit.model.twophase.ParticipantSynchronization.class
+ })
+public class WSCFTestSuite
{
- public WSCFTestSuite()
- {
- // wscf twophase tests
- addTest(new junit.framework.TestSuite(com.arjuna.wscf.tests.junit.model.twophase.StartEnd.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wscf.tests.junit.model.twophase.BeginConfirm.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wscf.tests.junit.model.twophase.BeginCancel.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wscf.tests.junit.model.twophase.Suspend.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wscf.tests.junit.model.twophase.SuspendResume.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wscf.tests.junit.model.twophase.SuspendConfirm.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wscf.tests.junit.model.twophase.CancelOnlyCancel.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wscf.tests.junit.model.twophase.CancelOnlyConfirm.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wscf.tests.junit.model.twophase.AddParticipant.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wscf.tests.junit.model.twophase.SuspendParticipant.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wscf.tests.junit.model.twophase.AddSynchronization.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wscf.tests.junit.model.twophase.ParticipantSynchronization.class));
- // this test relies on an invalid, out of date DOM implementation
- //addTest(new junit.framework.TestSuite(com.arjuna.wscf.tests.junit.model.twophase.ContextOutput.class));
- // TODO -- these tests break because ArjunaContextImple.toString() is broken. fix after 4.3.0 release
- //addTest(new junit.framework.TestSuite(com.arjuna.wscf.tests.junit.model.twophase.WscContext.class));
- //addTest(new junit.framework.TestSuite(com.arjuna.wscf.tests.junit.model.twophase.WscNestedContext.class));
- // this test relies on an invalid, out of date DOM implementation
- //addTest(new junit.framework.TestSuite(com.arjuna.wscf.tests.junit.model.twophase.WscTranslateContext.class));
- }
}
\ No newline at end of file
Modified: labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/as/jta/TopLevel1.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/as/jta/TopLevel1.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/as/jta/TopLevel1.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -49,7 +49,10 @@
import com.arjuna.mw.wscf.utils.DomUtil;
import com.arjuna.mwlabs.wscf.utils.ProtocolLocator;
import com.arjuna.wscf.tests.DemoXAParticipant;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -57,7 +60,7 @@
* @since 1.0.
*/
-public class TopLevel1 extends TestCase
+public class TopLevel1
{
private static final String PROTOCOL_IMPLEMENTATION_PROPERTY = "com.arjuna.mw.wscf.protocolImplementation";
private static final String testProtocolClassName = "com.arjuna.mwlabs.wscf.generic.coordinator.jta.JTAHLS";
Modified: labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/AddParticipant.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/AddParticipant.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/AddParticipant.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -37,7 +37,10 @@
import com.arjuna.wscf.tests.TwoPhaseParticipant;
import com.arjuna.wscf.tests.WSCFTestUtils;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -45,9 +48,10 @@
* @since 1.0.
*/
-public class AddParticipant extends TestCase
+public class AddParticipant
{
+ @Test
public void testAddParticipant()
throws Exception
{
Modified: labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/AddSynchronization.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/AddSynchronization.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/AddSynchronization.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -37,7 +37,10 @@
import com.arjuna.wscf.tests.TwoPhaseSynchronization;
import com.arjuna.wscf.tests.WSCFTestUtils;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -45,9 +48,10 @@
* @since 1.0.
*/
-public class AddSynchronization extends TestCase
+public class AddSynchronization
{
+ @Test
public void testAddSynchronization()
throws Exception
{
Modified: labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/BeginCancel.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/BeginCancel.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/BeginCancel.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -34,7 +34,10 @@
import com.arjuna.mw.wscf.model.twophase.api.UserCoordinator;
import com.arjuna.mw.wscf.model.twophase.UserCoordinatorFactory;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -42,9 +45,10 @@
* @since 1.0.
*/
-public class BeginCancel extends TestCase
+public class BeginCancel
{
+ @Test
public void testBeginCancel()
throws Exception
{
Modified: labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/BeginConfirm.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/BeginConfirm.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/BeginConfirm.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -35,7 +35,10 @@
import com.arjuna.mw.wscf.model.twophase.UserCoordinatorFactory;
import com.arjuna.wscf.tests.WSCFTestUtils;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -43,9 +46,10 @@
* @since 1.0.
*/
-public class BeginConfirm extends TestCase
+public class BeginConfirm
{
+ @Test
public void testBeginConfirm()
throws Exception
{
Modified: labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/CancelOnlyCancel.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/CancelOnlyCancel.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/CancelOnlyCancel.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -37,7 +37,10 @@
import com.arjuna.mw.wscf.model.twophase.exceptions.*;
import com.arjuna.wscf.tests.WSCFTestUtils;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -45,9 +48,10 @@
* @since 1.0.
*/
-public class CancelOnlyCancel extends TestCase
+public class CancelOnlyCancel
{
+ @Test
public void testCancelOnlyCancel()
throws Exception
{
Modified: labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/CancelOnlyConfirm.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/CancelOnlyConfirm.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/CancelOnlyConfirm.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -37,7 +37,10 @@
import com.arjuna.mw.wscf.model.twophase.exceptions.*;
import com.arjuna.wscf.tests.WSCFTestUtils;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -45,9 +48,10 @@
* @since 1.0.
*/
-public class CancelOnlyConfirm extends TestCase
+public class CancelOnlyConfirm
{
+ @Test
public void testCancelOnlyConfirm()
throws Exception
{
Modified: labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/ContextOutput.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/ContextOutput.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/ContextOutput.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -41,7 +41,10 @@
import com.arjuna.mw.wscf.model.twophase.UserCoordinatorFactory;
import com.arjuna.mw.wscf.model.twophase.api.UserCoordinator;
import com.arjuna.wscf.tests.WSCFTestUtils;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -49,9 +52,10 @@
* @since 1.0.
*/
-public class ContextOutput extends TestCase
+public class ContextOutput
{
+ @Test
public void testContextOutput()
throws Exception
{
Modified: labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/ParticipantSynchronization.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/ParticipantSynchronization.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/ParticipantSynchronization.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -38,7 +38,10 @@
import com.arjuna.wscf.tests.TwoPhaseParticipant;
import com.arjuna.wscf.tests.TwoPhaseSynchronization;
import com.arjuna.wscf.tests.WSCFTestUtils;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -46,9 +49,10 @@
* @since 1.0.
*/
-public class ParticipantSynchronization extends TestCase
+public class ParticipantSynchronization
{
+ @Test
public void testParticipantSynchronization()
throws Exception
{
Modified: labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/StartEnd.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/StartEnd.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/StartEnd.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -43,17 +43,21 @@
import com.arjuna.mw.wsas.exceptions.NoActivityException;
import com.arjuna.wscf.tests.WSCFTestUtils;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
/**
* @author Mark Little (mark.little at arjuna.com)
* @version $Id: StartEnd.java,v 1.3 2003/03/14 14:26:34 nmcl Exp $
* @since 1.0.
*/
-public class StartEnd extends TestCase
+public class StartEnd
{
-
+ @Test
public void testStartEnd()
throws Exception
{
Modified: labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/Suspend.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/Suspend.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/Suspend.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -39,7 +39,10 @@
import com.arjuna.mw.wscf.exceptions.*;
import com.arjuna.wscf.tests.WSCFTestUtils;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -47,9 +50,10 @@
* @since 1.0.
*/
-public class Suspend extends TestCase
+public class Suspend
{
+ @Test
public void testSuspend()
throws Exception
{
Modified: labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/SuspendConfirm.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/SuspendConfirm.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/SuspendConfirm.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -39,7 +39,10 @@
import com.arjuna.mw.wscf.exceptions.*;
import com.arjuna.wscf.tests.WSCFTestUtils;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -47,9 +50,10 @@
* @since 1.0.
*/
-public class SuspendConfirm extends TestCase
+public class SuspendConfirm
{
+ @Test
public void testSuspendConfirm()
throws Exception
{
Modified: labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/SuspendParticipant.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/SuspendParticipant.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/SuspendParticipant.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -40,7 +40,10 @@
import com.arjuna.wscf.tests.TwoPhaseParticipant;
import com.arjuna.wscf.tests.TwoPhaseSynchronization;
import com.arjuna.wscf.tests.WSCFTestUtils;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -48,9 +51,10 @@
* @since 1.0.
*/
-public class SuspendParticipant extends TestCase
+public class SuspendParticipant
{
+ @Test
public void testSuspendParticipant()
throws Exception
{
Modified: labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/SuspendResume.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/SuspendResume.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/SuspendResume.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -37,7 +37,10 @@
import com.arjuna.mw.wsas.activity.*;
import com.arjuna.wscf.tests.WSCFTestUtils;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -45,9 +48,10 @@
* @since 1.0.
*/
-public class SuspendResume extends TestCase
+public class SuspendResume
{
+ @Test
public void testSuspendResume()
throws Exception
{
Modified: labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/WscContext.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/WscContext.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/WscContext.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -37,7 +37,10 @@
import com.arjuna.mw.wscf.model.twophase.UserCoordinatorFactory;
import com.arjuna.mw.wscf.model.twophase.api.UserCoordinator;
import com.arjuna.wscf.tests.WSCFTestUtils;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -45,9 +48,10 @@
* @since 1.0.
*/
-public class WscContext extends TestCase
+public class WscContext
{
+ @Test
public void testWscContext()
throws Exception
{
Modified: labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/WscNestedContext.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/WscNestedContext.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/WscNestedContext.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -37,7 +37,10 @@
import com.arjuna.mw.wscf.model.twophase.UserCoordinatorFactory;
import com.arjuna.mw.wscf.model.twophase.api.UserCoordinator;
import com.arjuna.wscf.tests.WSCFTestUtils;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -45,9 +48,10 @@
* @since 1.0.
*/
-public class WscNestedContext extends TestCase
+public class WscNestedContext
{
+ @Test
public void testWscNestedContext()
throws Exception
{
Modified: labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/WscTranslateContext.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/WscTranslateContext.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf/tests/junit/model/twophase/WscTranslateContext.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -43,7 +43,10 @@
import com.arjuna.mw.wscf.model.twophase.api.UserCoordinator;
import com.arjuna.mw.wscf.utils.DomUtil;
import com.arjuna.wscf.tests.WSCFTestUtils;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -51,9 +54,10 @@
* @since 1.0.
*/
-public class WscTranslateContext extends TestCase
+public class WscTranslateContext
{
+ @Test
public void testWscTranslateContext()
throws Exception
{
Modified: labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/WSCF11TestSuite.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/WSCF11TestSuite.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/WSCF11TestSuite.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -24,29 +24,24 @@
package com.arjuna.wscf11.tests;
-public class WSCF11TestSuite extends junit.framework.TestSuite
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+ at RunWith(Suite.class)
+ @Suite.SuiteClasses({
+ com.arjuna.wscf11.tests.model.twophase.StartEnd.class,
+ com.arjuna.wscf11.tests.model.twophase.BeginConfirm.class,
+ com.arjuna.wscf11.tests.model.twophase.BeginCancel.class,
+ com.arjuna.wscf11.tests.model.twophase.Suspend.class,
+ com.arjuna.wscf11.tests.model.twophase.SuspendResume.class,
+ com.arjuna.wscf11.tests.model.twophase.SuspendConfirm.class,
+ com.arjuna.wscf11.tests.model.twophase.CancelOnlyCancel.class,
+ com.arjuna.wscf11.tests.model.twophase.CancelOnlyConfirm.class,
+ com.arjuna.wscf11.tests.model.twophase.AddParticipant.class,
+ com.arjuna.wscf11.tests.model.twophase.SuspendParticipant.class,
+ com.arjuna.wscf11.tests.model.twophase.AddSynchronization.class,
+ com.arjuna.wscf11.tests.model.twophase.ParticipantSynchronization.class
+ })
+public class WSCF11TestSuite
{
- public WSCF11TestSuite()
- {
- // wscf twophase tests
- addTest(new junit.framework.TestSuite(com.arjuna.wscf11.tests.model.twophase.StartEnd.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wscf11.tests.model.twophase.BeginConfirm.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wscf11.tests.model.twophase.BeginCancel.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wscf11.tests.model.twophase.Suspend.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wscf11.tests.model.twophase.SuspendResume.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wscf11.tests.model.twophase.SuspendConfirm.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wscf11.tests.model.twophase.CancelOnlyCancel.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wscf11.tests.model.twophase.CancelOnlyConfirm.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wscf11.tests.model.twophase.AddParticipant.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wscf11.tests.model.twophase.SuspendParticipant.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wscf11.tests.model.twophase.AddSynchronization.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wscf11.tests.model.twophase.ParticipantSynchronization.class));
- // this test relies on an invalid, out of date DOM implementation
- //addTest(new junit.framework.TestSuite(com.arjuna.wscf11.tests.model.twophase.ContextOutput.class));
- // TODO -- these tests break because ArjunaContextImple.toString() is broken. fix after 4.3.0 release
- //addTest(new junit.framework.TestSuite(com.arjuna.wscf11.tests.model.twophase.WscContext.class));
- //addTest(new junit.framework.TestSuite(com.arjuna.wscf11.tests.model.twophase.WscNestedContext.class));
- // this test relies on an invalid, out of date DOM implementation
- //addTest(new junit.framework.TestSuite(com.arjuna.wscf11.tests.model.twophase.WscTranslateContext.class));
- }
}
\ No newline at end of file
Modified: labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/AddParticipant.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/AddParticipant.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/AddParticipant.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -37,17 +37,19 @@
import com.arjuna.wscf11.tests.TwoPhaseParticipant;
import com.arjuna.wscf11.tests.WSCF11TestUtils;
-import junit.framework.TestCase;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
/**
* @author Mark Little (mark.little at arjuna.com)
* @version $Id: AddParticipant.java,v 1.2 2005/01/15 21:21:03 kconner Exp $
* @since 1.0.
*/
-public class AddParticipant extends TestCase
+public class AddParticipant
{
-
+ @Test
public void testAddParticipant()
throws Exception
{
Modified: labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/AddSynchronization.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/AddSynchronization.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/AddSynchronization.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -37,17 +37,19 @@
import com.arjuna.wscf11.tests.TwoPhaseSynchronization;
import com.arjuna.wscf11.tests.WSCF11TestUtils;
-import junit.framework.TestCase;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
/**
* @author Mark Little (mark.little at arjuna.com)
* @version $Id: AddSynchronization.java,v 1.1 2003/01/07 10:34:00 nmcl Exp $
* @since 1.0.
*/
-public class AddSynchronization extends TestCase
+public class AddSynchronization
{
-
+ @Test
public void testAddSynchronization()
throws Exception
{
Modified: labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/BeginCancel.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/BeginCancel.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/BeginCancel.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -34,17 +34,19 @@
import com.arjuna.mw.wscf.model.twophase.api.UserCoordinator;
import com.arjuna.mw.wscf11.model.twophase.UserCoordinatorFactory;
-import junit.framework.TestCase;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
/**
* @author Mark Little (mark.little at arjuna.com)
* @version $Id: BeginCancel.java,v 1.1 2003/01/07 10:34:00 nmcl Exp $
* @since 1.0.
*/
-public class BeginCancel extends TestCase
+public class BeginCancel
{
-
+ @Test
public void testBeginCancel()
throws Exception
{
Modified: labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/BeginConfirm.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/BeginConfirm.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/BeginConfirm.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -35,17 +35,19 @@
import com.arjuna.mw.wscf11.model.twophase.UserCoordinatorFactory;
import com.arjuna.wscf11.tests.WSCF11TestUtils;
-import junit.framework.TestCase;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
/**
* @author Mark Little (mark.little at arjuna.com)
* @version $Id: BeginConfirm.java,v 1.2 2003/01/17 15:39:35 nmcl Exp $
* @since 1.0.
*/
-public class BeginConfirm extends TestCase
+public class BeginConfirm
{
-
+ @Test
public void testBeginConfirm()
throws Exception
{
Modified: labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/CancelOnlyCancel.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/CancelOnlyCancel.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/CancelOnlyCancel.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -37,17 +37,19 @@
import com.arjuna.mw.wscf.model.twophase.exceptions.*;
import com.arjuna.wscf11.tests.WSCF11TestUtils;
-import junit.framework.TestCase;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
/**
* @author Mark Little (mark.little at arjuna.com)
* @version $Id: CancelOnlyCancel.java,v 1.1 2003/01/07 10:34:00 nmcl Exp $
* @since 1.0.
*/
-public class CancelOnlyCancel extends TestCase
+public class CancelOnlyCancel
{
-
+ @Test
public void testCancelOnlyCancel()
throws Exception
{
Modified: labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/CancelOnlyConfirm.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/CancelOnlyConfirm.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/CancelOnlyConfirm.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -37,17 +37,19 @@
import com.arjuna.mw.wscf.model.twophase.exceptions.*;
import com.arjuna.wscf11.tests.WSCF11TestUtils;
-import junit.framework.TestCase;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
/**
* @author Mark Little (mark.little at arjuna.com)
* @version $Id: CancelOnlyConfirm.java,v 1.1 2003/01/07 10:34:01 nmcl Exp $
* @since 1.0.
*/
-public class CancelOnlyConfirm extends TestCase
+public class CancelOnlyConfirm
{
-
+ @Test
public void testCancelOnlyConfirm()
throws Exception
{
Modified: labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/ParticipantSynchronization.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/ParticipantSynchronization.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/ParticipantSynchronization.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -38,17 +38,19 @@
import com.arjuna.wscf11.tests.TwoPhaseParticipant;
import com.arjuna.wscf11.tests.TwoPhaseSynchronization;
import com.arjuna.wscf11.tests.WSCF11TestUtils;
-import junit.framework.TestCase;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
/**
* @author Mark Little (mark.little at arjuna.com)
* @version $Id: ParticipantSynchronization.java,v 1.2 2005/01/15 21:21:03 kconner Exp $
* @since 1.0.
*/
-public class ParticipantSynchronization extends TestCase
+public class ParticipantSynchronization
{
-
+ @Test
public void testParticipantSynchronization()
throws Exception
{
Modified: labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/StartEnd.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/StartEnd.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/StartEnd.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -43,17 +43,19 @@
import com.arjuna.mw.wsas.exceptions.NoActivityException;
import com.arjuna.wscf11.tests.WSCF11TestUtils;
-import junit.framework.TestCase;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
/**
* @author Mark Little (mark.little at arjuna.com)
* @version $Id: StartEnd.java,v 1.3 2003/03/14 14:26:34 nmcl Exp $
* @since 1.0.
*/
-public class StartEnd extends TestCase
+public class StartEnd
{
-
+ @Test
public void testStartEnd()
throws Exception
{
Modified: labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/Suspend.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/Suspend.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/Suspend.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -39,17 +39,19 @@
import com.arjuna.mw.wscf.exceptions.*;
import com.arjuna.wscf11.tests.WSCF11TestUtils;
-import junit.framework.TestCase;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
/**
* @author Mark Little (mark.little at arjuna.com)
* @version $Id: Suspend.java,v 1.1 2003/01/07 10:34:01 nmcl Exp $
* @since 1.0.
*/
-public class Suspend extends TestCase
+public class Suspend
{
-
+ @Test
public void testSuspend()
throws Exception
{
Modified: labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/SuspendConfirm.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/SuspendConfirm.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/SuspendConfirm.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -39,17 +39,19 @@
import com.arjuna.mw.wscf.exceptions.*;
import com.arjuna.wscf11.tests.WSCF11TestUtils;
-import junit.framework.TestCase;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
/**
* @author Mark Little (mark.little at arjuna.com)
* @version $Id: SuspendConfirm.java,v 1.1 2003/01/07 10:34:01 nmcl Exp $
* @since 1.0.
*/
-public class SuspendConfirm extends TestCase
+public class SuspendConfirm
{
-
+ @Test
public void testSuspendConfirm()
throws Exception
{
Modified: labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/SuspendParticipant.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/SuspendParticipant.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/SuspendParticipant.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -40,17 +40,19 @@
import com.arjuna.wscf11.tests.TwoPhaseParticipant;
import com.arjuna.wscf11.tests.TwoPhaseSynchronization;
import com.arjuna.wscf11.tests.WSCF11TestUtils;
-import junit.framework.TestCase;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
/**
* @author Mark Little (mark.little at arjuna.com)
* @version $Id: SuspendParticipant.java,v 1.2 2005/01/15 21:21:03 kconner Exp $
* @since 1.0.
*/
-public class SuspendParticipant extends TestCase
+public class SuspendParticipant
{
-
+ @Test
public void testSuspendParticipant()
throws Exception
{
Modified: labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/SuspendResume.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/SuspendResume.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSCF/tests/classes/com/arjuna/wscf11/tests/model/twophase/SuspendResume.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -37,17 +37,19 @@
import com.arjuna.mw.wsas.activity.*;
import com.arjuna.wscf11.tests.WSCF11TestUtils;
-import junit.framework.TestCase;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
/**
* @author Mark Little (mark.little at arjuna.com)
* @version $Id: SuspendResume.java,v 1.1 2003/01/07 10:34:01 nmcl Exp $
* @since 1.0.
*/
-public class SuspendResume extends TestCase
+public class SuspendResume
{
-
+ @Test
public void testSuspendResume()
throws Exception
{
Modified: labs/jbosstm/trunk/XTS/WSCF/tests/dd/wscf-tests_application.xml
===================================================================
--- labs/jbosstm/trunk/XTS/WSCF/tests/dd/wscf-tests_application.xml 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSCF/tests/dd/wscf-tests_application.xml 2010-03-01 16:40:31 UTC (rev 31894)
@@ -41,6 +41,9 @@
</web>
</module>
<module>
+ <java>xts-test-servlet.jar</java>
+ </module>
+ <module>
<java>junit.jar</java>
</module>
<module>
Modified: labs/jbosstm/trunk/XTS/WSCF/tests/dd/wscf-tests_web-app.xml
===================================================================
--- labs/jbosstm/trunk/XTS/WSCF/tests/dd/wscf-tests_web-app.xml 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSCF/tests/dd/wscf-tests_web-app.xml 2010-03-01 16:40:31 UTC (rev 31894)
@@ -34,7 +34,7 @@
<servlet>
<servlet-name>JUnitTestsServlet</servlet-name>
- <servlet-class>com.arjuna.qa.junit.WSCFTestRunnerServlet</servlet-class>
+ <servlet-class>com.arjuna.qa.junit.TestRunnerServlet</servlet-class>
<init-param>
<param-name>TestSuiteClassName</param-name>
<param-value>com.arjuna.wscf.tests.WSCFTestSuite</param-value>
@@ -44,7 +44,7 @@
<servlet>
<servlet-name>JUnitTestsXMLServlet</servlet-name>
- <servlet-class>com.arjuna.qa.junit.WSCFTestRunnerXMLServlet</servlet-class>
+ <servlet-class>com.arjuna.qa.junit.TestRunnerXMLServlet</servlet-class>
<init-param>
<param-name>TestSuiteClassName</param-name>
<param-value>com.arjuna.wscf.tests.WSCFTestSuite</param-value>
Modified: labs/jbosstm/trunk/XTS/WSCF/tests/dd/wscf11-tests_application.xml
===================================================================
--- labs/jbosstm/trunk/XTS/WSCF/tests/dd/wscf11-tests_application.xml 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSCF/tests/dd/wscf11-tests_application.xml 2010-03-01 16:40:31 UTC (rev 31894)
@@ -34,6 +34,9 @@
</web>
</module>
<module>
+ <java>xts-test-servlet.jar</java>
+ </module>
+ <module>
<java>junit.jar</java>
</module>
<module>
Modified: labs/jbosstm/trunk/XTS/WSCF/tests/dd/wscf11-tests_web-app.xml
===================================================================
--- labs/jbosstm/trunk/XTS/WSCF/tests/dd/wscf11-tests_web-app.xml 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSCF/tests/dd/wscf11-tests_web-app.xml 2010-03-01 16:40:31 UTC (rev 31894)
@@ -34,7 +34,7 @@
<servlet>
<servlet-name>JUnitTestsServlet</servlet-name>
- <servlet-class>com.arjuna.qa.junit.WSCFTestRunnerServlet</servlet-class>
+ <servlet-class>com.arjuna.qa.junit.TestRunnerServlet</servlet-class>
<init-param>
<param-name>TestSuiteClassName</param-name>
<param-value>com.arjuna.wscf11.tests.WSCF11TestSuite</param-value>
@@ -44,7 +44,7 @@
<servlet>
<servlet-name>JUnitTestsXMLServlet</servlet-name>
- <servlet-class>com.arjuna.qa.junit.WSCFTestRunnerXMLServlet</servlet-class>
+ <servlet-class>com.arjuna.qa.junit.TestRunnerXMLServlet</servlet-class>
<init-param>
<param-name>TestSuiteClassName</param-name>
<param-value>com.arjuna.wscf11.tests.WSCF11TestSuite</param-value>
Modified: labs/jbosstm/trunk/XTS/WSTX/build.xml
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/build.xml 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/build.xml 2010-03-01 16:40:31 UTC (rev 31894)
@@ -126,6 +126,7 @@
<!--Set external directories -->
<property name="wsas.build.lib.dir" value="../WSAS/build/lib"/>
+ <property name="wsas.test.build.lib.dir" value="../WSAS/tests/build/lib"/>
<property name="wsc.build.dev.lib.dir" value="../WS-C/build/dev/lib"/>
<property name="wscf.build.lib.dir" value="../WSCF/build/lib"/>
<property name="wst.build.dev.lib.dir" value="../WS-T/build/dev/lib"/>
@@ -377,11 +378,9 @@
</war>
<war warfile="${wstx.tests.webapps.dest}/wstx11-tests.war" webxml="${wstx.tests.dd.dest}/web-app11.xml"/>
<ear earfile="${wstx.tests.webapps.dest}/wstx-tests.ear" appxml="${wstx.tests.dd}/wstx-tests_application.xml">
- <!--
- <fileset dir="${com.arjuna.jta.install.ext}" includes="${jta.ext.jars}"/>
- -->
<fileset dir="${xts.ext.dir}" includes="${tests.libs}"/>
<fileset dir="${wstx.tests.webapps.dest}" includes="wstx-tests.war wstx11-tests.war wstx-tests.jar"/>
+ <fileset dir="${wsas.test.build.lib.dir}" includes="xts-test-servlet.jar"/>
</ear>
</target>
@@ -395,6 +394,7 @@
<ear earfile="${wstx.tests.webapps.dest}/wstx-tests.ear" appxml="${wstx.tests.dd}/wstx11-tests_application.xml">
<fileset dir="${xts.ext.dir}" includes="${tests.libs}"/>
<fileset dir="${wstx.tests.webapps.dest}" includes="wstx11-tests.war wstx-tests.jar"/>
+ <fileset dir="${wsas.test.build.lib.dir}" includes="xts-test-servlet.jar"/>
</ear>
</target>
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/WSTXTestSuite.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/WSTXTestSuite.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/WSTXTestSuite.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -28,57 +28,47 @@
import com.arjuna.wst.tests.junit.basic.SubtransactionCommitFailInPrepare;
import com.arjuna.wst.tests.junit.basic.SubtransactionCommitRollbackInPrepare;
import com.arjuna.wst.tests.junit.basic.SubtransactionRollback;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
-public class WSTXTestSuite extends junit.framework.TestSuite
-{
- public WSTXTestSuite()
- {
- // wst basic tests
- // this test fails because the commit is retried forever instead of an exception being generated
- //addTest(new junit.framework.TestSuite(CommitExceptionInCommit.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.basic.CommitExceptionInPrepare.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.basic.CommitRollbackInPrepare.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.basic.MultiParticipants.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.basic.NestedTransaction.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.basic.NullCommitTransaction.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.basic.NullRollbackTransaction.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.basic.PrintTransaction.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.basic.ResumeNullTransaction.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.basic.RollbackExceptionInRollback.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.basic.SingleParticipant.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.basic.SuspendCommitTransaction.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.basic.SuspendNullTransaction.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.basic.SuspendResumeCommitTransaction.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.basic.SuspendResumeParticipants.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.basic.SuspendResumeSingleParticipant.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.basic.SuspendTransaction.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.basic.ThreadedTransaction.class));
+ at RunWith(Suite.class)
+ @Suite.SuiteClasses({
+ // wst basic tests
+ // this test fails because the commit is retried forever instead of an exception being generated
+ //addTest(new junit.framework.TestSuite(CommitExceptionInCommit.class));
+ com.arjuna.wst.tests.junit.basic.CommitExceptionInPrepare.class,
+ com.arjuna.wst.tests.junit.basic.CommitRollbackInPrepare.class,
+ com.arjuna.wst.tests.junit.basic.MultiParticipants.class,
+ com.arjuna.wst.tests.junit.basic.NestedTransaction.class,
+ com.arjuna.wst.tests.junit.basic.NullCommitTransaction.class,
+ com.arjuna.wst.tests.junit.basic.NullRollbackTransaction.class,
+ com.arjuna.wst.tests.junit.basic.PrintTransaction.class,
+ com.arjuna.wst.tests.junit.basic.ResumeNullTransaction.class,
+ com.arjuna.wst.tests.junit.basic.RollbackExceptionInRollback.class,
+ com.arjuna.wst.tests.junit.basic.SingleParticipant.class,
+ com.arjuna.wst.tests.junit.basic.SuspendCommitTransaction.class,
+ com.arjuna.wst.tests.junit.basic.SuspendNullTransaction.class,
+ com.arjuna.wst.tests.junit.basic.SuspendResumeCommitTransaction.class,
+ com.arjuna.wst.tests.junit.basic.SuspendResumeParticipants.class,
+ com.arjuna.wst.tests.junit.basic.SuspendResumeSingleParticipant.class,
+ com.arjuna.wst.tests.junit.basic.SuspendTransaction.class,
+ com.arjuna.wst.tests.junit.basic.ThreadedTransaction.class,
- // subtransaction tests
- addTest(new junit.framework.TestSuite(SubtransactionCommit.class));
- addTest(new junit.framework.TestSuite(SubtransactionRollback.class));
- addTest(new junit.framework.TestSuite(SubtransactionCommitRollbackInPrepare.class));
- addTest(new junit.framework.TestSuite(SubtransactionCommitFailInPrepare.class));
- // wst BA tests
- addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.ba.Cancel.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.ba.Close.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.ba.Compensate.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.ba.ConfirmWithComplete.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.ba.Exit.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.ba.MultiCancel.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.ba.MultiClose.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.ba.MultiCompensate.class));
-
- // wstx basic tests
- // these don't run at present because the WSCF protocol manager code cannot process the xml
- // in UserTwoPhaseTx.xml and TwoPhaseTxManager.xml and wstx.UserTransactionFactory tries to
- // use these documents to identify the transaction protocol it is meant to support
- //addTest(new junit.framework.TestSuite(com.arjuna.wstx.tests.junit.basic.NullCommitTransaction.class));
- //addTest(new junit.framework.TestSuite(com.arjuna.wstx.tests.junit.basic.NullNestedCommit.class));
- //addTest(new junit.framework.TestSuite(com.arjuna.wstx.tests.junit.basic.NullNestedRollback.class));
- //addTest(new junit.framework.TestSuite(com.arjuna.wstx.tests.junit.basic.NullRollbackOnly.class));
- //addTest(new junit.framework.TestSuite(com.arjuna.wstx.tests.junit.basic.NullRollbackTransaction.class));
- //addTest(new junit.framework.TestSuite(com.arjuna.wstx.tests.junit.basic.SingleParticipant.class));
- //addTest(new junit.framework.TestSuite(com.arjuna.wstx.tests.junit.basic.SynchronizationParticipant.class));
- }
+ // subtransaction tests
+ SubtransactionCommit.class,
+ SubtransactionRollback.class,
+ SubtransactionCommitRollbackInPrepare.class,
+ SubtransactionCommitFailInPrepare.class,
+ // wst BA tests
+ com.arjuna.wst.tests.junit.ba.Cancel.class,
+ com.arjuna.wst.tests.junit.ba.Close.class,
+ com.arjuna.wst.tests.junit.ba.Compensate.class,
+ com.arjuna.wst.tests.junit.ba.ConfirmWithComplete.class,
+ com.arjuna.wst.tests.junit.ba.Exit.class,
+ com.arjuna.wst.tests.junit.ba.MultiCancel.class,
+ com.arjuna.wst.tests.junit.ba.MultiClose.class,
+ com.arjuna.wst.tests.junit.ba.MultiCompensate.class
+ })
+public class WSTXTestSuite
+{
}
\ No newline at end of file
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/Cancel.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/Cancel.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/Cancel.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -34,7 +34,10 @@
import com.arjuna.mw.wst.BusinessActivityManager;
import com.arjuna.mw.wst.UserBusinessActivity;
import com.arjuna.wst.tests.common.DemoBusinessParticipant;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -42,9 +45,10 @@
* @since 1.0.
*/
-public class Cancel extends TestCase
+public class Cancel
{
- public static void testCancel()
+ @Test
+ public void testCancel()
throws Exception
{
UserBusinessActivity uba = UserBusinessActivity.getUserBusinessActivity();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/Close.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/Close.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/Close.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -34,7 +34,10 @@
import com.arjuna.mw.wst.BusinessActivityManager;
import com.arjuna.mw.wst.UserBusinessActivity;
import com.arjuna.wst.tests.common.DemoBusinessParticipant;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -42,9 +45,10 @@
* @since 1.0.
*/
-public class Close extends TestCase
+public class Close
{
- public static void testClose()
+ @Test
+ public void testClose()
throws Exception
{
UserBusinessActivity uba = UserBusinessActivity.getUserBusinessActivity();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/Compensate.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/Compensate.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/Compensate.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -34,7 +34,10 @@
import com.arjuna.mw.wst.BusinessActivityManager;
import com.arjuna.mw.wst.UserBusinessActivity;
import com.arjuna.wst.tests.common.DemoBusinessParticipant;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -42,9 +45,10 @@
* @since 1.0.
*/
-public class Compensate extends TestCase
+public class Compensate
{
- public static void testCompensate()
+ @Test
+ public void testCompensate()
throws Exception
{
UserBusinessActivity uba = UserBusinessActivity.getUserBusinessActivity();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/ConfirmWithComplete.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/ConfirmWithComplete.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/ConfirmWithComplete.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -34,7 +34,10 @@
import com.arjuna.mw.wst.BusinessActivityManager;
import com.arjuna.mw.wst.UserBusinessActivity;
import com.arjuna.wst.tests.common.DemoBusinessParticipantWithComplete;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -42,10 +45,10 @@
* @since 1.0.
*/
-public class ConfirmWithComplete extends TestCase
+public class ConfirmWithComplete
{
-
- public static void testConfirmWithComplete()
+ @Test
+ public void testConfirmWithComplete()
throws Exception
{
UserBusinessActivity uba = UserBusinessActivity.getUserBusinessActivity();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/Exit.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/Exit.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/Exit.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -34,7 +34,10 @@
import com.arjuna.mw.wst.BusinessActivityManager;
import com.arjuna.mw.wst.UserBusinessActivity;
import com.arjuna.wst.tests.common.DemoBusinessParticipant;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -42,9 +45,10 @@
* @since 1.0.
*/
-public class Exit extends TestCase
+public class Exit
{
- public static void testExit()
+ @Test
+ public void testExit()
throws Exception
{
UserBusinessActivity uba = UserBusinessActivity.getUserBusinessActivity();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/MultiCancel.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/MultiCancel.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/MultiCancel.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -36,7 +36,10 @@
import com.arjuna.wst.tests.common.DemoBusinessParticipant;
import com.arjuna.wst.tests.common.FailureBusinessParticipant;
import com.arjuna.wst.SystemException;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -44,9 +47,10 @@
* @since 1.0.
*/
-public class MultiCancel extends TestCase
+public class MultiCancel
{
- public static void testMultiCancel()
+ @Test
+ public void testMultiCancel()
throws Exception
{
UserBusinessActivity uba = UserBusinessActivity.getUserBusinessActivity();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/MultiClose.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/MultiClose.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/MultiClose.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -35,7 +35,10 @@
import com.arjuna.mw.wst.UserBusinessActivity;
import com.arjuna.wst.tests.common.DemoBusinessParticipant;
import com.arjuna.wst.tests.common.FailureBusinessParticipant;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -43,9 +46,10 @@
* @since 1.0.
*/
-public class MultiClose extends TestCase
+public class MultiClose
{
- public static void testMultiClose()
+ @Test
+ public void testMultiClose()
throws Exception
{
UserBusinessActivity uba = UserBusinessActivity.getUserBusinessActivity();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/MultiCompensate.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/MultiCompensate.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/MultiCompensate.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -35,7 +35,10 @@
import com.arjuna.mw.wst.UserBusinessActivity;
import com.arjuna.wst.tests.common.DemoBusinessParticipant;
import com.arjuna.wst.tests.common.FailureBusinessParticipant;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -43,9 +46,10 @@
* @since 1.0.
*/
-public class MultiCompensate extends TestCase
+public class MultiCompensate
{
- public static void testMultiCompensate()
+ @Test
+ public void testMultiCompensate()
throws Exception
{
UserBusinessActivity uba = UserBusinessActivity.getUserBusinessActivity();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/CommitExceptionInCommit.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/CommitExceptionInCommit.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/CommitExceptionInCommit.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -35,7 +35,10 @@
import com.arjuna.mw.wst.UserTransaction;
import com.arjuna.wst.tests.common.DemoDurableParticipant;
import com.arjuna.wst.tests.common.FailureParticipant;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -43,9 +46,10 @@
* @since 1.0.
*/
-public class CommitExceptionInCommit extends TestCase
+public class CommitExceptionInCommit
{
- public static void testCommitExceptionInCommit()
+ @Test
+ public void testCommitExceptionInCommit()
throws Throwable
{
UserTransaction ut = UserTransaction.getUserTransaction();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/CommitExceptionInPrepare.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/CommitExceptionInPrepare.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/CommitExceptionInPrepare.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -35,7 +35,10 @@
import com.arjuna.mw.wst.UserTransaction;
import com.arjuna.wst.tests.common.DemoDurableParticipant;
import com.arjuna.wst.tests.common.FailureParticipant;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -43,9 +46,10 @@
* @since 1.0.
*/
-public class CommitExceptionInPrepare extends TestCase
+public class CommitExceptionInPrepare
{
- public static void testCommitExceptionInPrepare()
+ @Test
+ public void testCommitExceptionInPrepare()
throws Exception
{
UserTransaction ut = UserTransaction.getUserTransaction();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/CommitRollbackInPrepare.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/CommitRollbackInPrepare.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/CommitRollbackInPrepare.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -35,7 +35,10 @@
import com.arjuna.mw.wst.UserTransaction;
import com.arjuna.wst.tests.common.DemoDurableParticipant;
import com.arjuna.wst.tests.common.FailureParticipant;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -43,10 +46,11 @@
* @since 1.0.
*/
-public class CommitRollbackInPrepare extends TestCase
+public class CommitRollbackInPrepare
{
- public static void testCommitRollbackInPrepare()
+ @Test
+ public void testCommitRollbackInPrepare()
throws Exception
{
UserTransaction ut = UserTransaction.getUserTransaction();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/MultiParticipants.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/MultiParticipants.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/MultiParticipants.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -34,7 +34,10 @@
import com.arjuna.mw.wst.TransactionManager;
import com.arjuna.mw.wst.UserTransaction;
import com.arjuna.wst.tests.common.DemoDurableParticipant;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -42,10 +45,11 @@
* @since 1.0.
*/
-public class MultiParticipants extends TestCase
+public class MultiParticipants
{
- public static void testMultiParticipants()
+ @Test
+ public void testMultiParticipants()
throws Exception
{
UserTransaction ut = UserTransaction.getUserTransaction();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/NestedTransaction.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/NestedTransaction.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/NestedTransaction.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -32,7 +32,10 @@
package com.arjuna.wst.tests.junit.basic;
import com.arjuna.mw.wst.UserTransaction;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -40,10 +43,11 @@
* @since 1.0.
*/
-public class NestedTransaction extends TestCase
+public class NestedTransaction
{
- public static void testNestedTransaction()
+ @Test
+ public void testNestedTransaction()
throws Exception
{
UserTransaction ut = UserTransaction.getUserTransaction();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/NullCommitTransaction.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/NullCommitTransaction.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/NullCommitTransaction.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -32,7 +32,10 @@
package com.arjuna.wst.tests.junit.basic;
import com.arjuna.mw.wst.UserTransaction;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -40,10 +43,11 @@
* @since 1.0.
*/
-public class NullCommitTransaction extends TestCase
+public class NullCommitTransaction
{
- public static void testNullCommitTransaction()
+ @Test
+ public void testNullCommitTransaction()
throws Exception
{
UserTransaction ut = UserTransaction.getUserTransaction();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/NullRollbackTransaction.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/NullRollbackTransaction.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/NullRollbackTransaction.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -32,7 +32,10 @@
package com.arjuna.wst.tests.junit.basic;
import com.arjuna.mw.wst.UserTransaction;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -40,10 +43,11 @@
* @since 1.0.
*/
-public class NullRollbackTransaction extends TestCase
+public class NullRollbackTransaction
{
- public static void testNullRollbackTransaction()
+ @Test
+ public void testNullRollbackTransaction()
throws Exception
{
UserTransaction ut = UserTransaction.getUserTransaction();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/PrintTransaction.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/PrintTransaction.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/PrintTransaction.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -32,7 +32,10 @@
package com.arjuna.wst.tests.junit.basic;
import com.arjuna.mw.wst.UserTransaction;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -40,10 +43,11 @@
* @since 1.0.
*/
-public class PrintTransaction extends TestCase
+public class PrintTransaction
{
- public static void testPrintTransaction()
+ @Test
+ public void testPrintTransaction()
throws Exception
{
UserTransaction ut = UserTransaction.getUserTransaction();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/ResumeNullTransaction.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/ResumeNullTransaction.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/ResumeNullTransaction.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -32,7 +32,10 @@
package com.arjuna.wst.tests.junit.basic;
import com.arjuna.mw.wst.TransactionManager;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -40,10 +43,11 @@
* @since 1.0.
*/
-public class ResumeNullTransaction extends TestCase
+public class ResumeNullTransaction
{
- public static void testResumeNullTransaction()
+ @Test
+ public void testResumeNullTransaction()
throws Exception
{
TransactionManager ut = TransactionManager.getTransactionManager();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/RollbackExceptionInRollback.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/RollbackExceptionInRollback.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/RollbackExceptionInRollback.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -35,7 +35,10 @@
import com.arjuna.mw.wst.UserTransaction;
import com.arjuna.wst.tests.common.DemoDurableParticipant;
import com.arjuna.wst.tests.common.FailureParticipant;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -43,9 +46,10 @@
* @since 1.0.
*/
-public class RollbackExceptionInRollback extends TestCase
+public class RollbackExceptionInRollback
{
- public static void testRollbackExceptionInRollback()
+ @Test
+ public void testRollbackExceptionInRollback()
throws Exception
{
UserTransaction ut = UserTransaction.getUserTransaction();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SingleParticipant.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SingleParticipant.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SingleParticipant.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -34,7 +34,10 @@
import com.arjuna.mw.wst.TransactionManager;
import com.arjuna.mw.wst.UserTransaction;
import com.arjuna.wst.tests.common.DemoDurableParticipant;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -42,10 +45,11 @@
* @since 1.0.
*/
-public class SingleParticipant extends TestCase
+public class SingleParticipant
{
- public static void testSingleParticipant()
+ @Test
+ public void testSingleParticipant()
throws Exception
{
UserTransaction ut = UserTransaction.getUserTransaction();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SubtransactionCommit.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SubtransactionCommit.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SubtransactionCommit.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -28,17 +28,21 @@
import com.arjuna.mw.wst.UserTransactionFactory;
import com.arjuna.wst.tests.common.DemoDurableParticipant;
import com.arjuna.wst.tests.common.DemoVolatileParticipant;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Andrew Dinn
* @version $Id:$
*/
-public class SubtransactionCommit extends TestCase
+public class SubtransactionCommit
{
- public static void testSubTransactionCommit()
+ @Test
+ public void testSubTransactionCommit()
throws Exception
{
final UserTransaction ut = UserTransactionFactory.userTransaction();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SubtransactionCommitFailInPrepare.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SubtransactionCommitFailInPrepare.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SubtransactionCommitFailInPrepare.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -29,17 +29,21 @@
import com.arjuna.wst.tests.common.DemoDurableParticipant;
import com.arjuna.wst.tests.common.DemoVolatileParticipant;
import com.arjuna.wst.TransactionRolledBackException;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Andrew Dinn
* @version $Id:$
*/
-public class SubtransactionCommitFailInPrepare extends TestCase
+public class SubtransactionCommitFailInPrepare
{
- public static void testSubTransactionCommitFailInPrepare()
+ @Test
+ public void testSubTransactionCommitFailInPrepare()
throws Exception
{
final UserTransaction ut = UserTransactionFactory.userTransaction();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SubtransactionCommitRollbackInPrepare.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SubtransactionCommitRollbackInPrepare.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SubtransactionCommitRollbackInPrepare.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -29,17 +29,21 @@
import com.arjuna.wst.tests.common.DemoVolatileParticipant;
import com.arjuna.wst.tests.common.FailureParticipant;
import com.arjuna.wst.TransactionRolledBackException;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Andrew Dinn
* @version $Id: $
*/
-public class SubtransactionCommitRollbackInPrepare extends TestCase
+public class SubtransactionCommitRollbackInPrepare
{
- public static void testSubTransactionCommitRollbackInPrepare()
+ @Test
+ public void testSubTransactionCommitRollbackInPrepare()
throws Exception
{
final UserTransaction ut = UserTransactionFactory.userTransaction();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SubtransactionRollback.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SubtransactionRollback.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SubtransactionRollback.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -27,17 +27,21 @@
import com.arjuna.mw.wst.UserTransactionFactory;
import com.arjuna.wst.tests.common.DemoDurableParticipant;
import com.arjuna.wst.tests.common.DemoVolatileParticipant;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Andrew Dinn
* @version $Id: $
*/
-public class SubtransactionRollback extends TestCase
+public class SubtransactionRollback
{
- public static void testSubTransactionRollback()
+ @Test
+ public void testSubTransactionRollback()
throws Exception
{
final UserTransaction ut = UserTransactionFactory.userTransaction();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SuspendCommitTransaction.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SuspendCommitTransaction.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SuspendCommitTransaction.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -36,7 +36,10 @@
import com.arjuna.mw.wst.UserTransaction;
import com.arjuna.wst.UnknownTransactionException;
import com.arjuna.wst.WrongStateException;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -44,10 +47,11 @@
* @since 1.0.
*/
-public class SuspendCommitTransaction extends TestCase
+public class SuspendCommitTransaction
{
- public static void testSuspendCommitTransaction()
+ @Test
+ public void testSuspendCommitTransaction()
throws Exception
{
UserTransaction ut = UserTransaction.getUserTransaction();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SuspendNullTransaction.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SuspendNullTransaction.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SuspendNullTransaction.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -33,7 +33,10 @@
import com.arjuna.mw.wst.TransactionManager;
import com.arjuna.mw.wst.TxContext;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -41,10 +44,11 @@
* @since 1.0.
*/
-public class SuspendNullTransaction extends TestCase
+public class SuspendNullTransaction
{
- public static void testSuspendNullTransaction()
+ @Test
+ public void testSuspendNullTransaction()
throws Exception
{
TransactionManager ut = TransactionManager.getTransactionManager();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SuspendResumeCommitTransaction.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SuspendResumeCommitTransaction.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SuspendResumeCommitTransaction.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -34,7 +34,10 @@
import com.arjuna.mw.wst.TransactionManager;
import com.arjuna.mw.wst.TxContext;
import com.arjuna.mw.wst.UserTransaction;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -42,10 +45,11 @@
* @since 1.0.
*/
-public class SuspendResumeCommitTransaction extends TestCase
+public class SuspendResumeCommitTransaction
{
- public static void testSuspendResumeCommitTransaction()
+ @Test
+ public void testSuspendResumeCommitTransaction()
throws Exception
{
UserTransaction ut = UserTransaction.getUserTransaction();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SuspendResumeParticipants.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SuspendResumeParticipants.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SuspendResumeParticipants.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -35,7 +35,10 @@
import com.arjuna.mw.wst.TxContext;
import com.arjuna.mw.wst.UserTransaction;
import com.arjuna.wst.tests.common.DemoDurableParticipant;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -43,10 +46,11 @@
* @since 1.0.
*/
-public class SuspendResumeParticipants extends TestCase
+public class SuspendResumeParticipants
{
- public static void testSuspendResumeParticipants()
+ @Test
+ public void testSuspendResumeParticipants()
throws Exception
{
UserTransaction ut = UserTransaction.getUserTransaction();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SuspendResumeSingleParticipant.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SuspendResumeSingleParticipant.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SuspendResumeSingleParticipant.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -35,7 +35,10 @@
import com.arjuna.mw.wst.TxContext;
import com.arjuna.mw.wst.UserTransaction;
import com.arjuna.wst.tests.common.DemoDurableParticipant;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -43,10 +46,11 @@
* @since 1.0.
*/
-public class SuspendResumeSingleParticipant extends TestCase
+public class SuspendResumeSingleParticipant
{
- public static void testSuspendResumeSingleParticipant()
+ @Test
+ public void testSuspendResumeSingleParticipant()
throws Exception
{
UserTransaction ut = UserTransaction.getUserTransaction();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SuspendTransaction.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SuspendTransaction.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SuspendTransaction.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -34,7 +34,10 @@
import com.arjuna.mw.wst.TransactionManager;
import com.arjuna.mw.wst.TxContext;
import com.arjuna.mw.wst.UserTransaction;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -42,10 +45,11 @@
* @since 1.0.
*/
-public class SuspendTransaction extends TestCase
+public class SuspendTransaction
{
- public static void testSuspendTransaction()
+ @Test
+ public void testSuspendTransaction()
throws Exception
{
UserTransaction ut = UserTransaction.getUserTransaction();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SynchronizationParticipant.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SynchronizationParticipant.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/SynchronizationParticipant.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -35,7 +35,10 @@
import com.arjuna.mw.wst.UserTransaction;
import com.arjuna.wst.tests.common.DemoDurableParticipant;
import com.arjuna.wst.tests.common.DemoVolatileParticipant;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -43,10 +46,11 @@
* @since 1.0.
*/
-public class SynchronizationParticipant extends TestCase
+public class SynchronizationParticipant
{
- public static void testSynchronizationParticipant()
+ @Test
+ public void testSynchronizationParticipant()
throws Exception
{
UserTransaction ut = UserTransaction.getUserTransaction();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/ThreadedTransaction.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/ThreadedTransaction.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/basic/ThreadedTransaction.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -32,7 +32,10 @@
package com.arjuna.wst.tests.junit.basic;
import com.arjuna.mw.wst.UserTransaction;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -78,10 +81,11 @@
}
-public class ThreadedTransaction extends TestCase
+public class ThreadedTransaction
{
- public static void testThreadedTransaction()
+ @Test
+ public void testThreadedTransaction()
throws Exception
{
boolean passed = false;
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/WSTX11TestSuite.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/WSTX11TestSuite.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/WSTX11TestSuite.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -28,59 +28,49 @@
import com.arjuna.wst11.tests.junit.basic.SubtransactionCommitFailInPrepare;
import com.arjuna.wst11.tests.junit.basic.SubtransactionCommitRollbackInPrepare;
import com.arjuna.wst11.tests.junit.basic.SubtransactionRollback;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
-public class WSTX11TestSuite extends junit.framework.TestSuite
-{
- public WSTX11TestSuite()
- {
- // wst basic tests
- // this test fails because the commit is retried forever instead of an exception being generated
- //addTest(new junit.framework.TestSuite(CommitExceptionInCommit.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wst11.tests.junit.basic.CommitExceptionInPrepare.class));
+ at RunWith(Suite.class)
+ at Suite.SuiteClasses({
+ // wst basic tests
+ // this test fails because the commit is retried forever instead of an exception being generated
+ //addTest(new junit.framework.TestSuite(CommitExceptionInCommit.class));
+ com.arjuna.wst11.tests.junit.basic.CommitExceptionInPrepare.class,
- addTest(new junit.framework.TestSuite(com.arjuna.wst11.tests.junit.basic.CommitRollbackInPrepare.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wst11.tests.junit.basic.MultiParticipants.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wst11.tests.junit.basic.NestedTransaction.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wst11.tests.junit.basic.NullCommitTransaction.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wst11.tests.junit.basic.NullRollbackTransaction.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wst11.tests.junit.basic.PrintTransaction.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wst11.tests.junit.basic.ResumeNullTransaction.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wst11.tests.junit.basic.RollbackExceptionInRollback.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wst11.tests.junit.basic.SingleParticipant.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wst11.tests.junit.basic.SuspendCommitTransaction.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wst11.tests.junit.basic.SuspendNullTransaction.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wst11.tests.junit.basic.SuspendResumeCommitTransaction.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wst11.tests.junit.basic.SuspendResumeParticipants.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wst11.tests.junit.basic.SuspendResumeSingleParticipant.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wst11.tests.junit.basic.SuspendTransaction.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wst11.tests.junit.basic.ThreadedTransaction.class));
- // subtransaction tests
- addTest(new junit.framework.TestSuite(SubtransactionCommit.class));
- addTest(new junit.framework.TestSuite(SubtransactionRollback.class));
- addTest(new junit.framework.TestSuite(SubtransactionCommitRollbackInPrepare.class));
- addTest(new junit.framework.TestSuite(SubtransactionCommitFailInPrepare.class));
+ com.arjuna.wst11.tests.junit.basic.CommitRollbackInPrepare.class,
+ com.arjuna.wst11.tests.junit.basic.MultiParticipants.class,
+ com.arjuna.wst11.tests.junit.basic.NestedTransaction.class,
+ com.arjuna.wst11.tests.junit.basic.NullCommitTransaction.class,
+ com.arjuna.wst11.tests.junit.basic.NullRollbackTransaction.class,
+ com.arjuna.wst11.tests.junit.basic.PrintTransaction.class,
+ com.arjuna.wst11.tests.junit.basic.ResumeNullTransaction.class,
+ com.arjuna.wst11.tests.junit.basic.RollbackExceptionInRollback.class,
+ com.arjuna.wst11.tests.junit.basic.SingleParticipant.class,
+ com.arjuna.wst11.tests.junit.basic.SuspendCommitTransaction.class,
+ com.arjuna.wst11.tests.junit.basic.SuspendNullTransaction.class,
+ com.arjuna.wst11.tests.junit.basic.SuspendResumeCommitTransaction.class,
+ com.arjuna.wst11.tests.junit.basic.SuspendResumeParticipants.class,
+ com.arjuna.wst11.tests.junit.basic.SuspendResumeSingleParticipant.class,
+ com.arjuna.wst11.tests.junit.basic.SuspendTransaction.class,
+ com.arjuna.wst11.tests.junit.basic.ThreadedTransaction.class,
+ // subtransaction tests
+ SubtransactionCommit.class,
+ SubtransactionRollback.class,
+ SubtransactionCommitRollbackInPrepare.class,
+ SubtransactionCommitFailInPrepare.class,
- // wst BA tests
- addTest(new junit.framework.TestSuite(com.arjuna.wst11.tests.junit.ba.Cancel.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wst11.tests.junit.ba.Close.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wst11.tests.junit.ba.Compensate.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wst11.tests.junit.ba.ConfirmWithComplete.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wst11.tests.junit.ba.Exit.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wst11.tests.junit.ba.MultiCancel.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wst11.tests.junit.ba.MultiClose.class));
- addTest(new junit.framework.TestSuite(com.arjuna.wst11.tests.junit.ba.MultiCompensate.class));
-
- // wstx basic tests
- // these don't run at present because the WSCF protocol manager code cannot process the xml
- // in UserTwoPhaseTx.xml and TwoPhaseTxManager.xml and wstx.UserTransactionFactory tries to
- // use these documents to identify the transaction protocol it is meant to support
- //addTest(new junit.framework.TestSuite(com.arjuna.wstx11.tests.junit.basic.NullCommitTransaction.class));
- //addTest(new junit.framework.TestSuite(com.arjuna.wstx11.tests.junit.basic.NullNestedCommit.class));
- //addTest(new junit.framework.TestSuite(com.arjuna.wstx11.tests.junit.basic.NullNestedRollback.class));
- //addTest(new junit.framework.TestSuite(com.arjuna.wstx11.tests.junit.basic.NullRollbackOnly.class));
- //addTest(new junit.framework.TestSuite(com.arjuna.wstx11.tests.junit.basic.NullRollbackTransaction.class));
- //addTest(new junit.framework.TestSuite(com.arjuna.wstx11.tests.junit.basic.SingleParticipant.class));
- //addTest(new junit.framework.TestSuite(com.arjuna.wstx11.tests.junit.basic.SynchronizationParticipant.class));
- }
+ // wst BA tests
+ com.arjuna.wst11.tests.junit.ba.Cancel.class,
+ com.arjuna.wst11.tests.junit.ba.Close.class,
+ com.arjuna.wst11.tests.junit.ba.Compensate.class,
+ com.arjuna.wst11.tests.junit.ba.ConfirmWithComplete.class,
+ com.arjuna.wst11.tests.junit.ba.Exit.class,
+ com.arjuna.wst11.tests.junit.ba.MultiCancel.class,
+ com.arjuna.wst11.tests.junit.ba.MultiClose.class,
+ com.arjuna.wst11.tests.junit.ba.MultiCompensate.class
+ })
+public class WSTX11TestSuite
+{
}
\ No newline at end of file
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/ba/Cancel.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/ba/Cancel.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/ba/Cancel.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -34,7 +34,10 @@
import com.arjuna.mw.wst11.BusinessActivityManager;
import com.arjuna.mw.wst11.UserBusinessActivity;
import com.arjuna.wst.tests.common.DemoBusinessParticipant;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -42,9 +45,10 @@
* @since 1.0.
*/
-public class Cancel extends TestCase
+public class Cancel
{
- public static void testCancel()
+ @Test
+ public void testCancel()
throws Exception
{
UserBusinessActivity uba = UserBusinessActivity.getUserBusinessActivity();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/ba/Close.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/ba/Close.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/ba/Close.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -34,7 +34,10 @@
import com.arjuna.mw.wst11.BusinessActivityManager;
import com.arjuna.mw.wst11.UserBusinessActivity;
import com.arjuna.wst.tests.common.DemoBusinessParticipant;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -42,9 +45,10 @@
* @since 1.0.
*/
-public class Close extends TestCase
+public class Close
{
- public static void testClose()
+ @Test
+ public void testClose()
throws Exception
{
UserBusinessActivity uba = UserBusinessActivity.getUserBusinessActivity();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/ba/Compensate.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/ba/Compensate.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/ba/Compensate.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -34,7 +34,10 @@
import com.arjuna.mw.wst11.BusinessActivityManager;
import com.arjuna.mw.wst11.UserBusinessActivity;
import com.arjuna.wst.tests.common.DemoBusinessParticipant;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -42,9 +45,10 @@
* @since 1.0.
*/
-public class Compensate extends TestCase
+public class Compensate
{
- public static void testCompensate()
+ @Test
+ public void testCompensate()
throws Exception
{
UserBusinessActivity uba = UserBusinessActivity.getUserBusinessActivity();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/ba/ConfirmWithComplete.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/ba/ConfirmWithComplete.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/ba/ConfirmWithComplete.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -34,7 +34,10 @@
import com.arjuna.mw.wst11.BusinessActivityManager;
import com.arjuna.mw.wst11.UserBusinessActivity;
import com.arjuna.wst.tests.common.DemoBusinessParticipantWithComplete;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -42,10 +45,11 @@
* @since 1.0.
*/
-public class ConfirmWithComplete extends TestCase
+public class ConfirmWithComplete
{
- public static void testConfirmWithComplete()
+ @Test
+ public void testConfirmWithComplete()
throws Exception
{
UserBusinessActivity uba = UserBusinessActivity.getUserBusinessActivity();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/ba/Exit.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/ba/Exit.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/ba/Exit.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -34,7 +34,10 @@
import com.arjuna.mw.wst11.BusinessActivityManager;
import com.arjuna.mw.wst11.UserBusinessActivity;
import com.arjuna.wst.tests.common.DemoBusinessParticipant;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -42,9 +45,10 @@
* @since 1.0.
*/
-public class Exit extends TestCase
+public class Exit
{
- public static void testExit()
+ @Test
+ public void testExit()
throws Exception
{
UserBusinessActivity uba = UserBusinessActivity.getUserBusinessActivity();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/ba/MultiCancel.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/ba/MultiCancel.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/ba/MultiCancel.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -36,7 +36,10 @@
import com.arjuna.wst.tests.common.DemoBusinessParticipant;
import com.arjuna.wst.tests.common.FailureBusinessParticipant;
import com.arjuna.wst.SystemException;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -44,9 +47,10 @@
* @since 1.0.
*/
-public class MultiCancel extends TestCase
+public class MultiCancel
{
- public static void testMultiCancel()
+ @Test
+ public void testMultiCancel()
throws Exception
{
UserBusinessActivity uba = UserBusinessActivity.getUserBusinessActivity();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/ba/MultiClose.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/ba/MultiClose.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/ba/MultiClose.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -35,7 +35,10 @@
import com.arjuna.mw.wst11.UserBusinessActivity;
import com.arjuna.wst.tests.common.DemoBusinessParticipant;
import com.arjuna.wst.tests.common.FailureBusinessParticipant;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -43,9 +46,10 @@
* @since 1.0.
*/
-public class MultiClose extends TestCase
+public class MultiClose
{
- public static void testMultiClose()
+ @Test
+ public void testMultiClose()
throws Exception
{
UserBusinessActivity uba = UserBusinessActivity.getUserBusinessActivity();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/ba/MultiCompensate.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/ba/MultiCompensate.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/ba/MultiCompensate.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -35,7 +35,10 @@
import com.arjuna.mw.wst11.UserBusinessActivity;
import com.arjuna.wst.tests.common.DemoBusinessParticipant;
import com.arjuna.wst.tests.common.FailureBusinessParticipant;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -43,9 +46,10 @@
* @since 1.0.
*/
-public class MultiCompensate extends TestCase
+public class MultiCompensate
{
- public static void testMultiCompensate()
+ @Test
+ public void testMultiCompensate()
throws Exception
{
UserBusinessActivity uba = UserBusinessActivity.getUserBusinessActivity();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/CommitExceptionInPrepare.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/CommitExceptionInPrepare.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/CommitExceptionInPrepare.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -35,7 +35,10 @@
import com.arjuna.mw.wst11.UserTransaction;
import com.arjuna.wst.tests.common.DemoDurableParticipant;
import com.arjuna.wst.tests.common.FailureParticipant;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -43,9 +46,10 @@
* @since 1.0.
*/
-public class CommitExceptionInPrepare extends TestCase
+public class CommitExceptionInPrepare
{
- public static void testCommitExceptionInPrepare()
+ @Test
+ public void testCommitExceptionInPrepare()
throws Exception
{
UserTransaction ut = UserTransaction.getUserTransaction();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/CommitRollbackInPrepare.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/CommitRollbackInPrepare.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/CommitRollbackInPrepare.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -35,7 +35,10 @@
import com.arjuna.mw.wst11.UserTransaction;
import com.arjuna.wst.tests.common.DemoDurableParticipant;
import com.arjuna.wst.tests.common.FailureParticipant;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -43,10 +46,11 @@
* @since 1.0.
*/
-public class CommitRollbackInPrepare extends TestCase
+public class CommitRollbackInPrepare
{
- public static void testCommitRollbackInPrepare()
+ @Test
+ public void testCommitRollbackInPrepare()
throws Exception
{
UserTransaction ut = UserTransaction.getUserTransaction();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/MultiParticipants.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/MultiParticipants.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/MultiParticipants.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -34,7 +34,10 @@
import com.arjuna.mw.wst11.TransactionManager;
import com.arjuna.mw.wst11.UserTransaction;
import com.arjuna.wst.tests.common.DemoDurableParticipant;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -42,10 +45,11 @@
* @since 1.0.
*/
-public class MultiParticipants extends TestCase
+public class MultiParticipants
{
- public static void testMultiParticipants()
+ @Test
+ public void testMultiParticipants()
throws Exception
{
UserTransaction ut = UserTransaction.getUserTransaction();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/NestedTransaction.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/NestedTransaction.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/NestedTransaction.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -32,7 +32,10 @@
package com.arjuna.wst11.tests.junit.basic;
import com.arjuna.mw.wst11.UserTransaction;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -40,10 +43,11 @@
* @since 1.0.
*/
-public class NestedTransaction extends TestCase
+public class NestedTransaction
{
- public static void testNestedTransaction()
+ @Test
+ public void testNestedTransaction()
throws Exception
{
UserTransaction ut = UserTransaction.getUserTransaction();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/NullCommitTransaction.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/NullCommitTransaction.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/NullCommitTransaction.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -32,7 +32,10 @@
package com.arjuna.wst11.tests.junit.basic;
import com.arjuna.mw.wst11.UserTransaction;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -40,10 +43,11 @@
* @since 1.0.
*/
-public class NullCommitTransaction extends TestCase
+public class NullCommitTransaction
{
- public static void testNullCommitTransaction()
+ @Test
+ public void testNullCommitTransaction()
throws Exception
{
UserTransaction ut = UserTransaction.getUserTransaction();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/NullRollbackTransaction.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/NullRollbackTransaction.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/NullRollbackTransaction.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -32,7 +32,10 @@
package com.arjuna.wst11.tests.junit.basic;
import com.arjuna.mw.wst11.UserTransaction;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -40,10 +43,11 @@
* @since 1.0.
*/
-public class NullRollbackTransaction extends TestCase
+public class NullRollbackTransaction
{
- public static void testNullRollbackTransaction()
+ @Test
+ public void testNullRollbackTransaction()
throws Exception
{
UserTransaction ut = UserTransaction.getUserTransaction();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/PrintTransaction.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/PrintTransaction.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/PrintTransaction.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -32,7 +32,10 @@
package com.arjuna.wst11.tests.junit.basic;
import com.arjuna.mw.wst11.UserTransaction;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -40,10 +43,11 @@
* @since 1.0.
*/
-public class PrintTransaction extends TestCase
+public class PrintTransaction
{
- public static void testPrintTransaction()
+ @Test
+ public void testPrintTransaction()
throws Exception
{
UserTransaction ut = UserTransaction.getUserTransaction();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/ResumeNullTransaction.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/ResumeNullTransaction.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/ResumeNullTransaction.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -32,7 +32,10 @@
package com.arjuna.wst11.tests.junit.basic;
import com.arjuna.mw.wst11.TransactionManager;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -40,10 +43,11 @@
* @since 1.0.
*/
-public class ResumeNullTransaction extends TestCase
+public class ResumeNullTransaction
{
- public static void testResumeNullTransaction()
+ @Test
+ public void testResumeNullTransaction()
throws Exception
{
TransactionManager ut = TransactionManager.getTransactionManager();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/RollbackExceptionInRollback.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/RollbackExceptionInRollback.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/RollbackExceptionInRollback.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -35,7 +35,10 @@
import com.arjuna.mw.wst11.UserTransaction;
import com.arjuna.wst.tests.common.DemoDurableParticipant;
import com.arjuna.wst.tests.common.FailureParticipant;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -43,9 +46,10 @@
* @since 1.0.
*/
-public class RollbackExceptionInRollback extends TestCase
+public class RollbackExceptionInRollback
{
- public static void testRollbackExceptionInRollback()
+ @Test
+ public void testRollbackExceptionInRollback()
throws Exception
{
UserTransaction ut = UserTransaction.getUserTransaction();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/SingleParticipant.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/SingleParticipant.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/SingleParticipant.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -34,7 +34,10 @@
import com.arjuna.mw.wst11.TransactionManager;
import com.arjuna.mw.wst11.UserTransaction;
import com.arjuna.wst.tests.common.DemoDurableParticipant;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -42,10 +45,11 @@
* @since 1.0.
*/
-public class SingleParticipant extends TestCase
+public class SingleParticipant
{
- public static void testSingleParticipant()
+ @Test
+ public void testSingleParticipant()
throws Exception
{
UserTransaction ut = UserTransaction.getUserTransaction();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/SubtransactionCommit.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/SubtransactionCommit.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/SubtransactionCommit.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -27,17 +27,21 @@
import com.arjuna.mw.wst.TxContext;
import com.arjuna.wst.tests.common.DemoDurableParticipant;
import com.arjuna.wst.tests.common.DemoVolatileParticipant;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Andrew Dinn
* @version $Id: $
*/
-public class SubtransactionCommit extends TestCase
+public class SubtransactionCommit
{
- public static void testSubTransactionCommit()
+ @Test
+ public void testSubTransactionCommit()
throws Exception
{
final UserTransaction ut = UserTransactionFactory.userTransaction();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/SubtransactionCommitFailInPrepare.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/SubtransactionCommitFailInPrepare.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/SubtransactionCommitFailInPrepare.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -29,7 +29,10 @@
import com.arjuna.wst.tests.common.DemoVolatileParticipant;
import com.arjuna.wst.tests.common.FailureParticipant;
import com.arjuna.wst.TransactionRolledBackException;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Andrew Dinn
@@ -37,10 +40,11 @@
* @since 1.0.
*/
-public class SubtransactionCommitFailInPrepare extends TestCase
+public class SubtransactionCommitFailInPrepare
{
- public static void testSubTransactionCommitFailInPrepare()
+ @Test
+ public void testSubTransactionCommitFailInPrepare()
throws Exception
{
final UserTransaction ut = UserTransactionFactory.userTransaction();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/SubtransactionCommitRollbackInPrepare.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/SubtransactionCommitRollbackInPrepare.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/SubtransactionCommitRollbackInPrepare.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -29,17 +29,21 @@
import com.arjuna.wst.tests.common.DemoDurableParticipant;
import com.arjuna.wst.tests.common.DemoVolatileParticipant;
import com.arjuna.wst.TransactionRolledBackException;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Andrew Dinn
* @version $Id:$
*/
-public class SubtransactionCommitRollbackInPrepare extends TestCase
+public class SubtransactionCommitRollbackInPrepare
{
- public static void testSubTransactionCommitRollbackInPrepare()
+ @Test
+ public void testSubTransactionCommitRollbackInPrepare()
throws Exception
{
final UserTransaction ut = UserTransactionFactory.userTransaction();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/SubtransactionRollback.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/SubtransactionRollback.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/SubtransactionRollback.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -27,17 +27,21 @@
import com.arjuna.mw.wst.TxContext;
import com.arjuna.wst.tests.common.DemoDurableParticipant;
import com.arjuna.wst.tests.common.DemoVolatileParticipant;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Andrew Dinn
* @version $Id:$
*/
-public class SubtransactionRollback extends TestCase
+public class SubtransactionRollback
{
- public static void testSubTransactionRollback()
+ @Test
+ public void testSubTransactionRollback()
throws Exception
{
final UserTransaction ut = UserTransactionFactory.userTransaction();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/SuspendCommitTransaction.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/SuspendCommitTransaction.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/SuspendCommitTransaction.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -36,7 +36,10 @@
import com.arjuna.mw.wst11.UserTransaction;
import com.arjuna.wst.UnknownTransactionException;
import com.arjuna.wst.WrongStateException;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -44,10 +47,11 @@
* @since 1.0.
*/
-public class SuspendCommitTransaction extends TestCase
+public class SuspendCommitTransaction
{
- public static void testSuspendCommitTransaction()
+ @Test
+ public void testSuspendCommitTransaction()
throws Exception
{
UserTransaction ut = UserTransaction.getUserTransaction();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/SuspendNullTransaction.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/SuspendNullTransaction.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/SuspendNullTransaction.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -33,7 +33,10 @@
import com.arjuna.mw.wst11.TransactionManager;
import com.arjuna.mw.wst.TxContext;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -41,10 +44,11 @@
* @since 1.0.
*/
-public class SuspendNullTransaction extends TestCase
+public class SuspendNullTransaction
{
- public static void testSuspendNullTransaction()
+ @Test
+ public void testSuspendNullTransaction()
throws Exception
{
TransactionManager ut = TransactionManager.getTransactionManager();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/SuspendResumeCommitTransaction.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/SuspendResumeCommitTransaction.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/SuspendResumeCommitTransaction.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -34,7 +34,10 @@
import com.arjuna.mw.wst11.TransactionManager;
import com.arjuna.mw.wst.TxContext;
import com.arjuna.mw.wst11.UserTransaction;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -42,10 +45,11 @@
* @since 1.0.
*/
-public class SuspendResumeCommitTransaction extends TestCase
+public class SuspendResumeCommitTransaction
{
- public static void testSuspendResumeCommitTransaction()
+ @Test
+ public void testSuspendResumeCommitTransaction()
throws Exception
{
UserTransaction ut = UserTransaction.getUserTransaction();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/SuspendResumeParticipants.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/SuspendResumeParticipants.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/SuspendResumeParticipants.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -35,7 +35,10 @@
import com.arjuna.mw.wst.TxContext;
import com.arjuna.mw.wst11.UserTransaction;
import com.arjuna.wst.tests.common.DemoDurableParticipant;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -43,10 +46,11 @@
* @since 1.0.
*/
-public class SuspendResumeParticipants extends TestCase
+public class SuspendResumeParticipants
{
- public static void testSuspendResumeParticipants()
+ @Test
+ public void testSuspendResumeParticipants()
throws Exception
{
UserTransaction ut = UserTransaction.getUserTransaction();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/SuspendResumeSingleParticipant.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/SuspendResumeSingleParticipant.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/SuspendResumeSingleParticipant.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -35,7 +35,10 @@
import com.arjuna.mw.wst.TxContext;
import com.arjuna.mw.wst11.UserTransaction;
import com.arjuna.wst.tests.common.DemoDurableParticipant;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -43,10 +46,11 @@
* @since 1.0.
*/
-public class SuspendResumeSingleParticipant extends TestCase
+public class SuspendResumeSingleParticipant
{
- public static void testSuspendResumeSingleParticipant()
+ @Test
+ public void testSuspendResumeSingleParticipant()
throws Exception
{
UserTransaction ut = UserTransaction.getUserTransaction();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/SuspendTransaction.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/SuspendTransaction.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/SuspendTransaction.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -34,7 +34,10 @@
import com.arjuna.mw.wst11.TransactionManager;
import com.arjuna.mw.wst.TxContext;
import com.arjuna.mw.wst11.UserTransaction;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
/**
* @author Mark Little (mark.little at arjuna.com)
@@ -42,10 +45,11 @@
* @since 1.0.
*/
-public class SuspendTransaction extends TestCase
+public class SuspendTransaction
{
- public static void testSuspendTransaction()
+ @Test
+ public void testSuspendTransaction()
throws Exception
{
UserTransaction ut = UserTransaction.getUserTransaction();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/ThreadedTransaction.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/ThreadedTransaction.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst11/tests/junit/basic/ThreadedTransaction.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -32,7 +32,10 @@
package com.arjuna.wst11.tests.junit.basic;
import com.arjuna.mw.wst11.UserTransaction;
-import junit.framework.TestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
class ThreadedObject extends Thread
@@ -73,10 +76,11 @@
}
-public class ThreadedTransaction extends TestCase
+public class ThreadedTransaction
{
- public static void testThreadedTransaction()
+ @Test
+ public void testThreadedTransaction()
throws Exception
{
boolean passed = false;
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wstx/tests/junit/basic/NullCommitTransaction.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wstx/tests/junit/basic/NullCommitTransaction.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wstx/tests/junit/basic/NullCommitTransaction.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -33,18 +33,20 @@
import com.arjuna.mw.wstx.UserTransaction;
import com.arjuna.mw.wstx.UserTransactionFactory;
-import junit.framework.TestCase;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
/**
* @author Mark Little (mark.little at arjuna.com)
* @version $Id: NullCommitTransaction.java,v 1.1 2002/11/25 11:00:54 nmcl Exp $
* @since 1.0.
*/
-public class NullCommitTransaction extends TestCase
+public class NullCommitTransaction
{
-
- public static void testNullCommitTransaction()
+ @Test
+ public void testNullCommitTransaction()
throws Exception
{
UserTransaction ut = UserTransactionFactory.userTransaction();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wstx/tests/junit/basic/NullNestedCommit.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wstx/tests/junit/basic/NullNestedCommit.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wstx/tests/junit/basic/NullNestedCommit.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -33,17 +33,19 @@
import com.arjuna.mw.wstx.UserTransaction;
import com.arjuna.mw.wstx.UserTransactionFactory;
-import junit.framework.TestCase;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
/**
* @author Mark Little (mark.little at arjuna.com)
* @version $Id: NullNestedCommit.java,v 1.1 2002/11/25 11:00:54 nmcl Exp $
* @since 1.0.
*/
-public class NullNestedCommit extends TestCase
+public class NullNestedCommit
{
-
+ @Test
public static void testNullNestedCommit()
throws Exception
{
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wstx/tests/junit/basic/NullNestedRollback.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wstx/tests/junit/basic/NullNestedRollback.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wstx/tests/junit/basic/NullNestedRollback.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -33,17 +33,19 @@
import com.arjuna.mw.wstx.UserTransaction;
import com.arjuna.mw.wstx.UserTransactionFactory;
-import junit.framework.TestCase;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
/**
* @author Mark Little (mark.little at arjuna.com)
* @version $Id: NullNestedRollback.java,v 1.1 2002/11/25 11:00:54 nmcl Exp $
* @since 1.0.
*/
-public class NullNestedRollback extends TestCase
+public class NullNestedRollback
{
-
+ @Test
public static void testNullNestedRollback()
throws Exception
{
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wstx/tests/junit/basic/NullRollbackOnly.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wstx/tests/junit/basic/NullRollbackOnly.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wstx/tests/junit/basic/NullRollbackOnly.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -35,17 +35,19 @@
import com.arjuna.mw.wstx.UserTransactionFactory;
import com.arjuna.mw.wstx.exceptions.TransactionRolledBackException;
-import junit.framework.TestCase;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
/**
* @author Mark Little (mark.little at arjuna.com)
* @version $Id: NullRollbackOnly.java,v 1.1 2002/11/25 11:00:54 nmcl Exp $
* @since 1.0.
*/
-public class NullRollbackOnly extends TestCase
+public class NullRollbackOnly
{
-
+ @Test
public static void testNullRollbackOnly()
throws Exception
{
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wstx/tests/junit/basic/NullRollbackTransaction.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wstx/tests/junit/basic/NullRollbackTransaction.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wstx/tests/junit/basic/NullRollbackTransaction.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -33,17 +33,19 @@
import com.arjuna.mw.wstx.UserTransaction;
import com.arjuna.mw.wstx.UserTransactionFactory;
-import junit.framework.TestCase;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
/**
* @author Mark Little (mark.little at arjuna.com)
* @version $Id: NullRollbackTransaction.java,v 1.1 2002/11/25 11:00:54 nmcl Exp $
* @since 1.0.
*/
-public class NullRollbackTransaction extends TestCase
+public class NullRollbackTransaction
{
-
+ @Test
public static void testNullRollbackTransaction()
throws Exception
{
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wstx/tests/junit/basic/SingleParticipant.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wstx/tests/junit/basic/SingleParticipant.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wstx/tests/junit/basic/SingleParticipant.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -34,17 +34,19 @@
import com.arjuna.wstx.tests.DemoParticipant;
import com.arjuna.mw.wstx.*;
-import junit.framework.TestCase;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
/**
* @author Mark Little (mark.little at arjuna.com)
* @version $Id: SingleParticipant.java,v 1.1 2002/11/25 11:00:54 nmcl Exp $
* @since 1.0.
*/
-public class SingleParticipant extends TestCase
+public class SingleParticipant
{
-
+ @Test
public static void testSingleParticipant()
throws Exception
{
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wstx/tests/junit/basic/SynchronizationParticipant.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wstx/tests/junit/basic/SynchronizationParticipant.java 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wstx/tests/junit/basic/SynchronizationParticipant.java 2010-03-01 16:40:31 UTC (rev 31894)
@@ -34,17 +34,19 @@
import com.arjuna.mw.wstx.*;
import com.arjuna.wstx.tests.DemoParticipant;
import com.arjuna.wstx.tests.DemoSynchronization;
-import junit.framework.TestCase;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
/**
* @author Mark Little (mark.little at arjuna.com)
* @version $Id: SynchronizationParticipant.java,v 1.1 2002/11/25 11:00:54 nmcl Exp $
* @since 1.0.
*/
-public class SynchronizationParticipant extends TestCase
+public class SynchronizationParticipant
{
-
+ @Test
public static void testSynchronizationParticipant()
throws Exception
{
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/dd/wstx-tests_application.xml
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/dd/wstx-tests_application.xml 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/dd/wstx-tests_application.xml 2010-03-01 16:40:31 UTC (rev 31894)
@@ -42,6 +42,10 @@
</module>
<module>
+ <java>xts-test-servlet.jar</java>
+ </module>
+
+ <module>
<java>junit.jar</java>
</module>
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/dd/wstx-tests_web-app.xml
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/dd/wstx-tests_web-app.xml 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/dd/wstx-tests_web-app.xml 2010-03-01 16:40:31 UTC (rev 31894)
@@ -34,7 +34,7 @@
<servlet>
<servlet-name>JUnitTestsServlet</servlet-name>
- <servlet-class>com.arjuna.qa.junit.WSTXTestRunnerServlet</servlet-class>
+ <servlet-class>com.arjuna.qa.junit.TestRunnerServlet</servlet-class>
<init-param>
<param-name>TestSuiteClassName</param-name>
<param-value>com.arjuna.wst.tests.WSTXTestSuite</param-value>
@@ -44,7 +44,7 @@
<servlet>
<servlet-name>JUnitTestsXMLServlet</servlet-name>
- <servlet-class>com.arjuna.qa.junit.WSTXTestRunnerXMLServlet</servlet-class>
+ <servlet-class>com.arjuna.qa.junit.TestRunnerXMLServlet</servlet-class>
<init-param>
<param-name>TestSuiteClassName</param-name>
<param-value>com.arjuna.wst.tests.WSTXTestSuite</param-value>
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/dd/wstx11-tests_application.xml
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/dd/wstx11-tests_application.xml 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/dd/wstx11-tests_application.xml 2010-03-01 16:40:31 UTC (rev 31894)
@@ -35,6 +35,10 @@
</module>
<module>
+ <java>xts-test-servlet.jar</java>
+ </module>
+
+ <module>
<java>junit.jar</java>
</module>
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/dd/wstx11-tests_web-app.xml
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/dd/wstx11-tests_web-app.xml 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/dd/wstx11-tests_web-app.xml 2010-03-01 16:40:31 UTC (rev 31894)
@@ -34,7 +34,7 @@
<servlet>
<servlet-name>JUnitTestsServlet</servlet-name>
- <servlet-class>com.arjuna.qa.junit.WSTXTestRunnerServlet</servlet-class>
+ <servlet-class>com.arjuna.qa.junit.TestRunnerServlet</servlet-class>
<init-param>
<param-name>TestSuiteClassName</param-name>
<param-value>com.arjuna.wst11.tests.WSTX11TestSuite</param-value>
@@ -44,7 +44,7 @@
<servlet>
<servlet-name>JUnitTestsXMLServlet</servlet-name>
- <servlet-class>com.arjuna.qa.junit.WSTXTestRunnerXMLServlet</servlet-class>
+ <servlet-class>com.arjuna.qa.junit.TestRunnerXMLServlet</servlet-class>
<init-param>
<param-name>TestSuiteClassName</param-name>
<param-value>com.arjuna.wst11.tests.WSTX11TestSuite</param-value>
Modified: labs/jbosstm/trunk/XTS/sharedbuild.xml
===================================================================
--- labs/jbosstm/trunk/XTS/sharedbuild.xml 2010-03-01 15:49:16 UTC (rev 31893)
+++ labs/jbosstm/trunk/XTS/sharedbuild.xml 2010-03-01 16:40:31 UTC (rev 31894)
@@ -38,7 +38,7 @@
<!-- TODO ok, I lied. stop using the old junit from our own ext lib and use the new one in the parent build/extlib -->
- <property name="xts.ext.dir" location="ext"/>
+ <property name="xts.ext.dir" location="${jbossts.build.extlib.dir}"/>
<!-- required JBossTS product jars -->
<property name="jbossts.install.lib.jars" value="jbossjta.jar jbossjts.jar"/>
More information about the jboss-svn-commits
mailing list