WebSphere MQ Workflow 3.4 Generic C API Test / Prototyping Tool

[prev][next][parent][TOC]

FmcjResult - Example

Testcase
/* Example20 testcase  (FmcjResult...() APIs) */

FmcjGlobalConnect
  XpRc                              FMC_OK
End

FmcjResultObjectOfCurrentThread
  ResultHdl                         1
End

FmcjExecutionServiceAllocateForSystem
  System                            "SYSTEM"
  SystemGroup                       "SYS_GRP"
  ExecutionServiceHdl               1
  XpRc                              FMC_OK
End


TestTool_If
  ExpressionOperator                AND
End

   /*...........................................................*/

   FmcjExecutionServiceSystemName
     ExecutionServiceHdl               1
     BufferLength                      8
     XpValue                           "SYSTEM"
   End

   /*
      Remark: The required BufferLength is
              #define  FMC_SYSTEM_NAME_LENGTH   (8+1)
              ===> An ERROR will be expected when BufferLength = 8;
   */

   /*...........................................................*/

TestTool_Then

   /*...........................................................*/

   TestTool_CommentToOutput
     Comment                    "API FmcjExecutionServiceSystemName() returned the expected value"
     ToStandardError            TRUE
   End

   /*...........................................................*/

TestTool_Else

   /*...........................................................*/

   FmcjResultRc
     ResultHdl                         1
     XpRc                              FMC_ERROR_BUFFER
   End

   FmcjResultMessageText
     ResultHdl                         1
     BufferLength                      1025
     XpValue                           "FMC00800E Provided buffer is too small
"
   End

   FmcjResultOrigin
     ResultHdl                         1
     BufferLength                      91
   End

   FmcjExecutionServiceSystemName
     ExecutionServiceHdl               1
     BufferLength                      9
     XpValue                           "SYSTEM"
   End

   /*...........................................................*/

TestTool_EndIf

FmcjExecutionServiceDeallocate
  ExecutionServiceHdl               1
  XpRc                              FMC_OK
End

FmcjGlobalDisconnect
  XpRc                              FMC_OK
End 




Result
C API Test Tool for MQ Workflow v31_347 Windows 95/NT: K:\FLE\FMCTJCA1
Test case: EXAMPLE20
Thu Jul 16 11:48:13 1998
============================================================================
+++>
============================================================================
FmcjGlobalConnect
..........RC Report.........................................................
AcRc = FMC_OK = 0
XpRc = FMC_OK
+++OK+++
============================================================================
FmcjResultObjectOfCurrentThread
parameter:  ResultHdl = 1
..........Status Report.....................................................
ResultHdl = 0x00C12820
============================================================================
FmcjExecutionServiceAllocateForSystem
parameter:  System = SYSTEM
parameter:  SystemGroup = SYS_GRP
parameter:  ExecutionServiceHdl = 1
..........RC Report.........................................................
AcRc = FMC_OK = 0
XpRc = FMC_OK
+++OK+++
============================================================================
TestTool_If
============================================================================
FmcjExecutionServiceSystemName
parameter:  ExecutionServiceHdl = 1
parameter:  BufferLength = 8
..........Value Report......................................................
AcValue = NULL
XpValue = "SYSTEM"
API expression is FALSE;  IF expression is FALSE
============================================================================
TestTool_Then
============================================================================
TestTool_Else
============================================================================
FmcjResultRc
parameter:  ResultHdl = 1
..........RC Report.........................................................
AcRc = FMC_ERROR_BUFFER = 800
XpRc = FMC_ERROR_BUFFER
+++OK+++
============================================================================
FmcjResultMessageText
parameter:  ResultHdl = 1
parameter:  BufferLength = 1025
..........Value Report......................................................
AcValue = "FMC00800E Provided buffer is too small
"
XpValue = "FMC00800E Provided buffer is too small
"
+++OK+++
============================================================================
FmcjResultOrigin
parameter:  ResultHdl = 1
parameter:  BufferLength = 91
..........Value Report......................................................
AcValue = "e:\v31_347\src\fmcjccom.cxx, line 2468"
XpValue = Expected value missing
============================================================================
FmcjExecutionServiceSystemName
parameter:  ExecutionServiceHdl = 1
parameter:  BufferLength = 9
..........Value Report......................................................
AcValue = "SYSTEM"
XpValue = "SYSTEM"
+++OK+++
============================================================================
TestTool_EndIf
============================================================================
FmcjExecutionServiceDeallocate
parameter:  ExecutionServiceHdl = 1
..........RC Report.........................................................
AcRc = FMC_OK = 0
XpRc = FMC_OK
+++OK+++
============================================================================
FmcjGlobalDisconnect
..........RC Report.........................................................
AcRc = FMC_OK = 0
XpRc = FMC_OK
+++OK+++
============================================================================
====== Test case ended normally ============================================