Windows NT 4.0 source code leak
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2872 lines
77 KiB

4 years ago
  1. '******************************************************************************
  2. ' TAPI_BVT.mst TAPI API Build Verification Test
  3. ' Ronald Rohr
  4. ' April 15, 1996
  5. ' Status = Pre-Test Design Review, Pre-Code Review
  6. ' Version = 0.1
  7. ' This test Performs the Build Verification Test of the TAPI API
  8. '
  9. ' A description of the Test Cases Can be found in TCM, Server: lostpup,
  10. ' Database: TAPICASES, Tree: BVT.
  11. ' Logon with ID & Password = Tapicase (read only privlages)
  12. ' TAPI Browser 2.0 (TB20.exe) is required to run this test.
  13. '******************************************************************************
  14. '******************************************************************************
  15. ' TEST CASE LIST (in order of execution)
  16. '* TC - 4 lineOpen and lineClose with all privileges
  17. '* TC - 5 lineNegotiateAPIVersion / 1.4
  18. '* TC - 8 lineGetDevCaps
  19. '* TC - 9 lineMakeCall - privileges = none, monitor, owner
  20. '* TC - 10 lineMakeCall - line unavalable
  21. '- TC - 11 lineMakeCall - to a busy number
  22. '* TC - 13 lineDrop - with active call
  23. '* TC - 14 lineDeallocate - w/ active call
  24. '* TC - 15 lineShutDown - with active call
  25. '* TC - 16 lineClose - with active call
  26. '* TC - 21 lineSetCurrentLocation - with valid and invalid Location IDs
  27. '* TC - 22 lineGetCountry
  28. '* TC - 26 lineGetTranslateCaps - determine SUCCESS and validity of
  29. '* TC - 27 lineTranslateAddress - valid and invalid addresses
  30. '* TC - 28 lineTranslateAddress - valid and invalid credit cards
  31. '* TC - 29 lineTranslateAddress - valid and invalid translate options
  32. '* TC - 31 lineConfigDialog
  33. '* TC - 32 lineTranslateDialog
  34. ' TC - 78 lineAnswer
  35. ' TC - 79 lineAccept
  36. '* TC - 80 lineDial
  37. '* TC - 81 lineGetID - comm & comm/datamodem
  38. '* TC - 83 lineReply & lineCallState
  39. '* TC - 175 lineNegotiateAPIVersion / 2.0
  40. '* TC - 176 lineGetMessage
  41. '* TC - 177 lineGetStatusMessage
  42. '* TC - 178 lineGetNumRings & lineSetNumRings
  43. '$INCLUDE 'declares.inc'
  44. option base 0
  45. Const TEST_SCRIPT_TITLE = "TAPI Build Verification Test" 'Test Script Name
  46. Const TEST_SCRIPT_VERSION = "5/17/96" 'Test Script Version
  47. Const TIMEOUT = 3 'Timeout value for MSTest APIs
  48. Global Test_Logfile as string 'Results Log File Name
  49. Global SlowPC as long 'Set to TRUE if Alpha or 486
  50. dim rtn as long 'Generic long return
  51. dim CRLFrtn as long 'location of CRLF in string
  52. dim ErrorMessage as string 'Error Message string for On Error Procedure
  53. dim ParamSet as long 'State of TB20 Param checkbox
  54. dim LOpen_ID as string 'ID returned by lineOpen
  55. dim CurCountryID as string 'Hold Current Country ID TC - 26
  56. dim CreditCardID as string 'Hold Credit Card ID TC - 26
  57. dim count as short 'Generic counter
  58. dim tempstr as string 'Generic string
  59. dim Returnstr as string 'Holds TB20 EditBox text
  60. dim hDlg as long 'Generic handle
  61. dim ModemName as string 'Modem Name for TC - 81, found in TC - 31
  62. dim strhObject as string 'Used in TC - 81
  63. dim NumRings as string 'Number of rings rtn by lineGetNumRings
  64. '$include 'Tapilog.inc' 'required for all common file I/O procedures
  65. '$include 'TAPI_API.inc' 'API Constant declarations used in TAPI Browser
  66. '$include 'TAPI_BVT.inc' 'Functions and Constants used by TAPI_BVT.MST
  67. ''$include 'TAPI_TEMP.INC' 'location of functions under construction
  68. on error goto ErrorHandler
  69. on end EndTest
  70. ' Bounds Checker can only be run from a system that has Visual Test installed
  71. ' otherwise a run time error will occur.
  72. ' The Bounds Checker binaries cannot be redistributed.
  73. ' NUMEGA should only be defined when running in the VT environment.
  74. '$ifdef NUMEGA
  75. on BoundsCheckerNotify (NULL) Call BoundsChkHandler
  76. '$endif 'NUMEGA
  77. '$ifdef DEBUG_TEST_SCRIPT
  78. viewport on
  79. viewport clear
  80. '$endif 'DEBUG_TEST_SCRIPT
  81. viewport off
  82. '*** Test Initialization
  83. redim (ParamTraits) (0) as ParamAttributes
  84. SetDefaultWaitTimeout (5)
  85. TotalScenarios = 0
  86. Test_Logfile = TESTMODE$
  87. CurrentLoggingLevel = DetailCase
  88. SetLogFileName
  89. rtn = StartLog (DELETE_LOGFILE, TEST_SCRIPT_TITLE)
  90. SetWndTimeout () 'Set timeouts for all platforms
  91. '*** Verify Modem set otherwise stop test
  92. rtn = DetectModem
  93. if rtn = FALSE then
  94. tempstr = "This Test Will Terminate" + CRLF + CRLF + _
  95. "Please Set up Modem on this computer" + CRLF + _
  96. "prior to running the TAPI BVT"
  97. WritelogItem ("" , tempstr )
  98. Statusbox tempstr, 0,0,0,0, TRUE, TRUE
  99. Sleep 6
  100. Stop 'Stop the test
  101. endif
  102. '*** Set Service Provider in RegEdit to unimdm.tsp
  103. '$IFDEF Already_Validated
  104. '$ENDIF 'Already_Validated
  105. SetupProviders ()
  106. '******************************************************************************
  107. '*** TC - 4 lineOpen and lineClose with all privileges *
  108. '******************************************************************************
  109. '*** Start TAPI Browser
  110. StartTAPIBrowser(hTB20, hTB_Ctrl, hTB_CtrlID)
  111. WritelogItem ("Test Case 4" , "")
  112. TC_ID = 4
  113. TotalScenarios = TotalScenarios + 1
  114. redim (ParamTraits) (0) as ParamAttributes
  115. '--- Step 2
  116. ParamSet = SetParamState (hTB20, UNCHECKED)
  117. rtn = Call_LInitialize ( (hTB20), (hTB_Ctrl), Paramset, hLineApp, Num_Dev )
  118. if Num_Dev = 0 then
  119. WritelogItem ("lineInitialize Returned 0 devices ", "")
  120. WritelogItem ("Configure Telephony to use Unimodem Service Provider before starting the test ", "")
  121. WritelogItem ("This Test Will Terminate", "")
  122. end
  123. endif
  124. if rtn > 0 then
  125. WritelogItem ("lineInitialize failed error = " , ltrim$(hex$(rtn)))
  126. WritelogItem ("" , "This Test Will Terminate")
  127. end
  128. endif
  129. '--- Step 3
  130. ParamSet = SetParamState (hTB20, CHECKED)
  131. '--- Step 4, 5 , 6, 7
  132. ParamTraits(0).Param = "dwPrivileges"
  133. ParamTraits(0).BitFlagList = "NONE"
  134. ParamTraits(0).ValueEdit = ""
  135. ParamTraits(0).ValueList = ""
  136. rtn = Call_LOpen ( (hTB20), (hTB_Ctrl), ParamSet, lOpenRtn )
  137. '--- Results 1
  138. teststring.TC_Num = 1
  139. teststring.Expect_Res = "LineOpen Rtn SUCCESS"
  140. teststring.Actual_Res = LineReturnString ( rtn )
  141. TotalTestCases = TotalTestCases + 1
  142. if rtn = 0 then
  143. teststring.Apprase = "Pass"
  144. else
  145. teststring.Apprase = "FAIL *"
  146. FailedTestCases = FailedTestCases + 1
  147. endif
  148. LogCase (teststring)
  149. '--- Results 2
  150. teststring.TC_Num = 2
  151. teststring.Expect_Res = "LineOpen DialOut Privilege"
  152. teststring.Actual_Res = lOpenRtn.priv
  153. TotalTestCases = TotalTestCases + 1
  154. if teststring.Actual_Res = "DialOut" then
  155. teststring.Apprase = "Pass"
  156. else
  157. teststring.Apprase = "FAIL *"
  158. FailedTestCases = FailedTestCases + 1
  159. endif
  160. LogCase (teststring)
  161. '--- Steps 8 through 17
  162. ParamTraits(0).Param = ""
  163. ParamTraits(0).BitFlagList = ""
  164. ParamTraits(0).ValueEdit = ""
  165. ParamTraits(0).ValueList = ""
  166. rtn = Call_LClose ((hTB20), (hTB_Ctrl), ParamSet )
  167. 'All ParamTraits should be set to null
  168. rtn = Call_LShutDown ((hTB20), (hTB_Ctrl), ParamSet )
  169. 'All ParamTraits should be set to null
  170. rtn = Call_LInitialize ( (hTB20), (hTB_Ctrl), Paramset, hLineApp, Num_Dev )
  171. ParamTraits(0).Param = "dwPrivileges"
  172. ParamTraits(0).BitFlagList = "MONITOR"
  173. ParamTraits(0).ValueEdit = ""
  174. ParamTraits(0).ValueList = ""
  175. rtn = Call_LOpen ( (hTB20), (hTB_Ctrl), ParamSet, lOpenRtn )
  176. '--- Results 3
  177. teststring.TC_Num = 3
  178. teststring.Expect_Res = "LineOpen Rtn SUCCESS"
  179. teststring.Actual_Res = LineReturnString ( rtn )
  180. TotalTestCases = TotalTestCases + 1
  181. if rtn = 0 then
  182. teststring.Apprase = "Pass"
  183. else
  184. teststring.Apprase = "FAIL *"
  185. FailedTestCases = FailedTestCases + 1
  186. endif
  187. LogCase (teststring)
  188. '--- Results 4
  189. teststring.TC_Num = 4
  190. teststring.Expect_Res = "LineOpen Monitor Privilege"
  191. teststring.Actual_Res = lOpenRtn.priv
  192. TotalTestCases = TotalTestCases + 1
  193. if teststring.Actual_Res = "Monitor" then
  194. teststring.Apprase = "Pass"
  195. else
  196. teststring.Apprase = "FAIL *"
  197. FailedTestCases = FailedTestCases + 1
  198. endif
  199. LogCase (teststring)
  200. '--- Steps 18 through 27
  201. ParamTraits(0).Param = ""
  202. ParamTraits(0).BitFlagList = ""
  203. ParamTraits(0).ValueEdit = ""
  204. ParamTraits(0).ValueList = ""
  205. rtn = Call_LClose ((hTB20), (hTB_Ctrl), ParamSet )
  206. 'All ParamTraits should be set to null
  207. rtn = Call_LShutDown ((hTB20), (hTB_Ctrl), ParamSet )
  208. 'All ParamTraits should be set to null
  209. rtn = Call_LInitialize ( (hTB20), (hTB_Ctrl), Paramset, hLineApp, Num_Dev )
  210. ParamTraits(0).Param = "dwPrivileges"
  211. ParamTraits(0).BitFlagList = "OWNER"
  212. ParamTraits(0).ValueEdit = ""
  213. ParamTraits(0).ValueList = ""
  214. rtn = Call_LOpen ( (hTB20), (hTB_Ctrl), ParamSet, lOpenRtn )
  215. '--- Results 5
  216. teststring.TC_Num = 5
  217. teststring.Expect_Res = "LineOpen Rtn SUCCESS"
  218. teststring.Actual_Res = LineReturnString ( rtn )
  219. TotalTestCases = TotalTestCases + 1
  220. if rtn = 0 then
  221. teststring.Apprase = "Pass"
  222. else
  223. teststring.Apprase = "FAIL *"
  224. FailedTestCases = FailedTestCases + 1
  225. endif
  226. LogCase (teststring)
  227. '--- Results 6
  228. teststring.TC_Num = 6
  229. teststring.Expect_Res = "LineOpen DialInOut Privilege"
  230. teststring.Actual_Res = lOpenRtn.priv
  231. TotalTestCases = TotalTestCases + 1
  232. if teststring.Actual_Res = "DialInOut" then
  233. teststring.Apprase = "Pass"
  234. else
  235. teststring.Apprase = "FAIL *"
  236. FailedTestCases = FailedTestCases + 1
  237. endif
  238. LogCase (teststring)
  239. '--- Steps 28 through 32
  240. ParamTraits(0).Param = ""
  241. ParamTraits(0).BitFlagList = ""
  242. ParamTraits(0).ValueEdit = ""
  243. ParamTraits(0).ValueList = ""
  244. rtn = Call_LClose ((hTB20), (hTB_Ctrl), ParamSet )
  245. 'All ParamTraits should be set to null
  246. rtn = Call_LShutDown ((hTB20), (hTB_Ctrl), ParamSet )
  247. ' Close TAPI Browser - ALL LINES MUST BE SHUTDOWN BY NOW
  248. WSetActWnd (hTB20)
  249. WMenuSelect (MFILE + "\" + MEXIT, TIMEOUT)
  250. '******************************************************************************
  251. ' TC - 5 lineNegotiateAPIVersion / 1.4 *
  252. '******************************************************************************
  253. '--- Step 1 through 6
  254. StartTAPIBrowser(hTB20, hTB_Ctrl, hTB_CtrlID)
  255. WritelogItem (" " , "")
  256. WritelogItem ("Test Case 5" , "")
  257. TC_ID = 5
  258. TotalScenarios = TotalScenarios + 1
  259. ParamSet = SetParamState (hTB20, UNCHECKED)
  260. rtn = Call_LInitialize ( (hTB20), (hTB_Ctrl), Paramset, hLineApp, Num_Dev )
  261. if rtn > 0 then
  262. WritelogItem ("lineInitialize failed error = " , ltrim$(hex$(rtn)))
  263. WritelogItem ("" , "This Test Will Terminate")
  264. end
  265. endif
  266. ParamSet = SetParamState (hTB20, CHECKED)
  267. ParamTraits(0).Param = ""
  268. ParamTraits(0).BitFlagList = ""
  269. ParamTraits(0).ValueEdit = ""
  270. ParamTraits(0).ValueList = ""
  271. rtn = Call_LNegotiateAPIVer ( (hTB20), (hTB_Ctrl), ParamSet, lNegVerRtn )
  272. '--- Results 1
  273. teststring.TC_Num = 1
  274. teststring.Expect_Res = "LineNegotiateAPIVersion Rtn SUCCESS"
  275. teststring.Actual_Res = LineReturnString (rtn)
  276. TotalTestCases = TotalTestCases + 1
  277. if teststring.Actual_Res = "SUCCESS" then
  278. teststring.Apprase = "Pass"
  279. else
  280. teststring.Apprase = "FAIL *"
  281. FailedTestCases = FailedTestCases + 1
  282. endif
  283. LogCase (teststring)
  284. '--- API Version Results
  285. teststring.Expect_Res = "x10004"
  286. teststring.Actual_Res = lNegVerRtn.API_Ver
  287. TotalTestCases = TotalTestCases + 1
  288. if teststring.Actual_Res = teststring.Expect_Res then
  289. teststring.Apprase = "Pass"
  290. else
  291. teststring.Apprase = "FAIL *"
  292. FailedTestCases = FailedTestCases + 1
  293. endif
  294. LogCase (teststring)
  295. teststring.Expect_Res = "ID's = x0"
  296. TotalTestCases = TotalTestCases + 1
  297. rtn = 0
  298. for count = 0 to 3
  299. if lNegVerRtn.ID(count) <> "x0" then
  300. rtn = rtn + 1 'rtn is used as a fail counter
  301. end if
  302. next
  303. if rtn = 0 then
  304. teststring.Actual_Res = "ID's = x0"
  305. teststring.Apprase = "Pass"
  306. else
  307. teststring.Actual_Res = "ID's <> x0"
  308. teststring.Apprase = "FAIL *"
  309. FailedTestCases = FailedTestCases + 1
  310. endif
  311. LogCase (teststring)
  312. '--- Steps 7 through 10
  313. ParamTraits(0).Param = "dwAPILowVersion"
  314. ParamTraits(0).BitFlagList = ""
  315. ParamTraits(0).ValueEdit = "00030000"
  316. ParamTraits(0).ValueList = ""
  317. rtn = Call_LNegotiateAPIVer ( (hTB20), (hTB_Ctrl), ParamSet, lNegVerRtn )
  318. '--- Results 2
  319. teststring.TC_Num = 2
  320. teststring.Expect_Res = "INCOMPATIBLEAPIVERSION"
  321. teststring.Actual_Res = LineReturnString (rtn)
  322. TotalTestCases = TotalTestCases + 1
  323. if teststring.Actual_Res = LineReturnString (LINEERR_INCOMPATIBLEAPIVERSION) then
  324. teststring.Apprase = "Pass"
  325. else
  326. teststring.Apprase = "FAIL *"
  327. FailedTestCases = FailedTestCases + 1
  328. endif
  329. LogCase (teststring)
  330. '--- Steps 11 through 14
  331. ParamTraits(0).Param = "dwAPILowVersion"
  332. ParamTraits(0).BitFlagList = ""
  333. ParamTraits(0).ValueEdit = "00010003"
  334. ParamTraits(0).ValueList = ""
  335. rtn = Call_LNegotiateAPIVer ( (hTB20), (hTB_Ctrl), ParamSet, lNegVerRtn )
  336. '--- Results 3
  337. teststring.TC_Num = 3
  338. teststring.Expect_Res = "LineNegotiateAPIVersion Rtn SUCCESS"
  339. teststring.Actual_Res = LineReturnString (rtn)
  340. TotalTestCases = TotalTestCases + 1
  341. if teststring.Actual_Res = "SUCCESS" then
  342. teststring.Apprase = "Pass"
  343. else
  344. teststring.Apprase = "FAIL *"
  345. FailedTestCases = FailedTestCases + 1
  346. endif
  347. LogCase (teststring)
  348. '--- API Version Results
  349. teststring.Expect_Res = "x10004"
  350. teststring.Actual_Res = lNegVerRtn.API_Ver
  351. TotalTestCases = TotalTestCases + 1
  352. if teststring.Actual_Res = teststring.Expect_Res then
  353. teststring.Apprase = "Pass"
  354. else
  355. teststring.Apprase = "FAIL *"
  356. FailedTestCases = FailedTestCases + 1
  357. endif
  358. LogCase (teststring)
  359. teststring.Expect_Res = "ID's = x0"
  360. TotalTestCases = TotalTestCases + 1
  361. rtn = 0
  362. for count = 0 to 3
  363. if lNegVerRtn.ID(count) <> "x0" then
  364. rtn = rtn + 1 'rtn is used as a fail counter
  365. end if
  366. next
  367. if rtn = 0 then
  368. teststring.Actual_Res = "ID's = x0"
  369. teststring.Apprase = "Pass"
  370. else
  371. teststring.Actual_Res = "ID's <> x0"
  372. teststring.Apprase = "FAIL *"
  373. FailedTestCases = FailedTestCases + 1
  374. endif
  375. LogCase (teststring)
  376. ParamTraits(0).Param = ""
  377. ParamTraits(0).BitFlagList = ""
  378. ParamTraits(0).ValueEdit = ""
  379. ParamTraits(0).ValueList = ""
  380. rtn = Call_LShutDown ((hTB20), (hTB_Ctrl), ParamSet )
  381. ParamSet = SetParamState (hTB20, UNCHECKED)
  382. ' Close TAPI Browser - ALL LINES MUST BE SHUTDOWN BY NOW
  383. WSetActWnd (hTB20)
  384. WMenuSelect (MFILE + "\" + MEXIT, TIMEOUT)
  385. '******************************************************************************
  386. ' TC - 13 lineDrop with active call *
  387. '******************************************************************************
  388. '--- Step 1 through 5
  389. StartTAPIBrowser(hTB20, hTB_Ctrl, hTB_CtrlID)
  390. WritelogItem (" " , "")
  391. WritelogItem ("Test Case 13" , "")
  392. TC_ID = 13
  393. TotalScenarios = TotalScenarios + 1
  394. ParamSet = SetParamState (hTB20, UNCHECKED)
  395. rtn = Call_LInitialize ( (hTB20), (hTB_Ctrl), Paramset, hLineApp, Num_Dev )
  396. if rtn > 0 then
  397. WritelogItem ("lineInitialize failed error = " , ltrim$(hex$(rtn)))
  398. WritelogItem ("" , "This Test Will Terminate")
  399. end
  400. endif
  401. rtn = Call_LOpen ( (hTB20), (hTB_Ctrl), ParamSet, lOpenRtn )
  402. if rtn > 0 then
  403. WritelogItem ("lineOpen failed error = " , ltrim$(hex$(rtn)))
  404. WritelogItem ("" , "This Test Will Terminate")
  405. end
  406. endif
  407. ReceiveState.Msg = "LINE_CALLSTATE"
  408. ReceiveState.device = ""
  409. ReceiveState.cbInst = ""
  410. ReceiveState.param1 = "PROCEEDING"
  411. ReceiveState.param2 = ""
  412. ReceiveState.param3 = ""
  413. ReceiveState.ErrorStr = ""
  414. rtn = Call_LMakeCall ( (hTB20), (hTB_Ctrl), ParamSet, ReceiveState, Returnstr )
  415. 'if rtn <= 0 then
  416. ' WritelogItem ("lineMakeCall failed error = " , ReceiveState.param1)
  417. ' WritelogItem ("" , "This Test Will Terminate")
  418. ' end
  419. 'endif
  420. '--- Step 6
  421. ReceiveState.Msg = "LINE_CALLSTATE"
  422. ReceiveState.device = ""
  423. ReceiveState.cbInst = ""
  424. ReceiveState.param1 = "IDLE"
  425. ReceiveState.param2 = ""
  426. ReceiveState.param3 = ""
  427. rtn = Call_LDrop ( (hTB20), (hTB_Ctrl), ParamSet, ReceiveState )
  428. '--- Results 1
  429. teststring.TC_Num = 1
  430. teststring.Expect_Res = "IDLE"
  431. teststring.Actual_Res =ReceiveState.param1
  432. TotalTestCases = TotalTestCases + 1
  433. if rtn = TRUE then
  434. teststring.Apprase = "Pass"
  435. else
  436. teststring.Apprase = "FAIL *"
  437. FailedTestCases = FailedTestCases + 1
  438. endif
  439. LogCase (teststring)
  440. '--- Steps 7 through 10
  441. '******************************************************************************
  442. ' TC - 14 lineDeallocate w/ active call *
  443. '******************************************************************************
  444. rtn = Call_LDrop ( (hTB20), (hTB_Ctrl), ParamSet,ReceiveState )
  445. 'rtn = Call_lDeallocateCall ((hTB20), (hTB_Ctrl), ParamSet )
  446. 'Step 7 of TC 13 is in reality TC 14
  447. WritelogItem (" " , "")
  448. WritelogItem ("Test Case 14" , "")
  449. TC_ID = 14
  450. TotalScenarios = TotalScenarios + 1
  451. rtn = Call_lDeallocateCall ((hTB20), (hTB_Ctrl), ParamSet )
  452. teststring.TC_Num = 1
  453. teststring.Expect_Res = "LineDeallocateCall Rtn SUCCESS"
  454. teststring.Actual_Res = LineReturnString (rtn)
  455. TotalTestCases = TotalTestCases + 1
  456. if teststring.Actual_Res = "SUCCESS" then
  457. teststring.Apprase = "Pass"
  458. else
  459. teststring.Apprase = "FAIL *"
  460. FailedTestCases = FailedTestCases + 1
  461. endif
  462. LogCase (teststring)
  463. rtn = Call_LClose ((hTB20), (hTB_Ctrl), ParamSet )
  464. rtn = Call_LShutDown ((hTB20), (hTB_Ctrl), ParamSet )
  465. ' Close TAPI Browser - ALL LINES MUST BE SHUTDOWN BY NOW
  466. WSetActWnd (hTB20)
  467. WMenuSelect (MFILE + "\" + MEXIT, TIMEOUT)
  468. '******************************************************************************
  469. ' TC - 15 lineShutDown with active call *
  470. '******************************************************************************
  471. '--- Step 1 through 4
  472. StartTAPIBrowser(hTB20, hTB_Ctrl, hTB_CtrlID)
  473. WritelogItem (" " , "")
  474. WritelogItem ("Test Case 15" , "")
  475. TC_ID = 15
  476. TotalScenarios = TotalScenarios + 1
  477. ParamSet = SetParamState (hTB20, UNCHECKED)
  478. rtn = Call_LInitialize ( (hTB20), (hTB_Ctrl), Paramset, hLineApp, Num_Dev )
  479. if rtn > 0 then
  480. WritelogItem ("lineInitialize failed error = " , ltrim$(hex$(rtn)))
  481. WritelogItem ("" , "This Test Will Terminate")
  482. end
  483. endif
  484. rtn = Call_LOpen ( (hTB20), (hTB_Ctrl), ParamSet, lOpenRtn )
  485. if rtn > 0 then
  486. WritelogItem ("lineOpen failed error = " , ltrim$(hex$(rtn)))
  487. WritelogItem ("" , "This Test Will Terminate")
  488. end
  489. endif
  490. ReceiveState.Msg = "LINE_CALLSTATE"
  491. ReceiveState.device = ""
  492. ReceiveState.cbInst = ""
  493. ReceiveState.param1 = "PROCEEDING"
  494. ReceiveState.param2 = ""
  495. ReceiveState.param3 = ""
  496. rtn = Call_LMakeCall ( (hTB20), (hTB_Ctrl), ParamSet, ReceiveState, Returnstr )
  497. 'if rtn = FALSE then
  498. ' WritelogItem ("lineMakeCall failed error = " ,ReceiveState.param1)
  499. ' WritelogItem ("" , "This Test Will Terminate")
  500. ' end
  501. 'endif
  502. '--- Results 1
  503. rtn = Call_LShutDown ((hTB20), (hTB_Ctrl), ParamSet )
  504. teststring.TC_Num = 1
  505. teststring.Expect_Res = "LineShutDown Rtn SUCCESS"
  506. teststring.Actual_Res = LineReturnString (rtn)
  507. TotalTestCases = TotalTestCases + 1
  508. if teststring.Actual_Res = "SUCCESS" then
  509. teststring.Apprase = "Pass"
  510. else
  511. teststring.Apprase = "FAIL *"
  512. FailedTestCases = FailedTestCases + 1
  513. endif
  514. LogCase (teststring)
  515. ' Close TAPI Browser - ALL LINES MUST BE SHUTDOWN BY NOW
  516. WSetActWnd (hTB20)
  517. WMenuSelect (MFILE + "\" + MEXIT, TIMEOUT)
  518. '******************************************************************************
  519. ' TC - 16 lineClose with active call *
  520. '******************************************************************************
  521. '--- Step 1 through 4
  522. StartTAPIBrowser(hTB20, hTB_Ctrl, hTB_CtrlID)
  523. WritelogItem (" " , "")
  524. WritelogItem ("Test Case 16" , "")
  525. TC_ID = 16
  526. TotalScenarios = TotalScenarios + 1
  527. ParamSet = SetParamState (hTB20, UNCHECKED)
  528. rtn = Call_LInitialize ( (hTB20), (hTB_Ctrl), Paramset, hLineApp, Num_Dev )
  529. if rtn > 0 then
  530. WritelogItem ("lineInitialize failed error = " , ltrim$(hex$(rtn)))
  531. WritelogItem ("" , "This Test Will Terminate")
  532. end
  533. endif
  534. rtn = Call_LOpen ( (hTB20), (hTB_Ctrl), ParamSet, lOpenRtn )
  535. if rtn > 0 then
  536. WritelogItem ("lineOpen failed error = " , ltrim$(hex$(rtn)))
  537. WritelogItem ("" , "This Test Will Terminate")
  538. end
  539. endif
  540. ReceiveState.Msg = "LINE_CALLSTATE"
  541. ReceiveState.device = ""
  542. ReceiveState.cbInst = ""
  543. ReceiveState.param1 = "PROCEEDING"
  544. ReceiveState.param2 = ""
  545. ReceiveState.param3 = ""
  546. rtn = Call_LMakeCall ( (hTB20), (hTB_Ctrl), ParamSet, ReceiveState, Returnstr )
  547. 'if rtn <= 0 then
  548. ' WritelogItem ("lineMakeCall failed error = " ,ReceiveState.param1)
  549. ' WritelogItem ("" , "This Test Will Terminate")
  550. ' end
  551. 'endif
  552. '--- Step 5
  553. rtn = Call_LClose ((hTB20), (hTB_Ctrl), ParamSet )
  554. '--- Result 1
  555. teststring.TC_Num = 1
  556. teststring.Expect_Res = "LineClose Rtn SUCCESS"
  557. teststring.Actual_Res = LineReturnString ( rtn )
  558. TotalTestCases = TotalTestCases + 1
  559. if rtn = 0 then
  560. teststring.Apprase = "Pass"
  561. else
  562. teststring.Apprase = "FAIL *"
  563. FailedTestCases = FailedTestCases + 1
  564. endif
  565. LogCase (teststring)
  566. '--- Steps 6, 7
  567. rtn = Call_LShutDown ((hTB20), (hTB_Ctrl), ParamSet )
  568. WSetActWnd (hTB20)
  569. WMenuSelect (MFILE + "\" + MEXIT, TIMEOUT)
  570. '******************************************************************************
  571. ' TC - 8 lineGetDevCaps *
  572. '******************************************************************************
  573. '--- Step 1, 2
  574. StartTAPIBrowser(hTB20, hTB_Ctrl, hTB_CtrlID)
  575. WritelogItem (" " , "")
  576. WritelogItem ("Test Case 8" , "")
  577. TC_ID = 8
  578. TotalScenarios = TotalScenarios + 1
  579. ParamSet = SetParamState (hTB20, UNCHECKED)
  580. rtn = Call_LInitialize ( (hTB20), (hTB_Ctrl), Paramset, hLineApp, Num_Dev )
  581. if rtn > 0 then
  582. WritelogItem ("lineInitialize failed error = " , ltrim$(hex$(rtn)))
  583. WritelogItem ("" , "This Test Will Terminate")
  584. end
  585. endif
  586. '--- Step 3
  587. rtn = Call_LGetDevCaps ( (hTB20), (hTB_Ctrl), Paramset)
  588. '--- Result 1
  589. teststring.TC_Num = 1
  590. teststring.Expect_Res = "LineGetDevCaps Rtn SUCCESS"
  591. teststring.Actual_Res = LineReturnString ( rtn )
  592. TotalTestCases = TotalTestCases + 1
  593. if rtn = 0 then
  594. teststring.Apprase = "Pass"
  595. else
  596. teststring.Apprase = "FAIL *"
  597. FailedTestCases = FailedTestCases + 1
  598. endif
  599. LogCase (teststring)
  600. '--- Step 4
  601. ParamSet = SetParamState (hTB20, CHECKED)
  602. ParamTraits(0).Param = "dwDeviceID"
  603. ParamTraits(0).BitFlagList = ""
  604. ParamTraits(0).ValueEdit = ""
  605. ParamTraits(0).ValueList = "ffffffff"
  606. '--- Step 5 through 8
  607. rtn = Call_LGetDevCaps ( (hTB20), (hTB_Ctrl), Paramset)
  608. '--- Result 2
  609. teststring.TC_Num = 2
  610. teststring.Expect_Res = "BADDEVICEID"
  611. teststring.Actual_Res = LineReturnString ( rtn )
  612. TotalTestCases = TotalTestCases + 1
  613. if rtn = LINEERR_BADDEVICEID then
  614. teststring.Apprase = "Pass"
  615. else
  616. teststring.Apprase = "FAIL *"
  617. FailedTestCases = FailedTestCases + 1
  618. endif
  619. LogCase (teststring)
  620. '--- Steps 9, 10
  621. ParamSet = SetParamState (hTB20, UNCHECKED)
  622. rtn = Call_LShutDown ((hTB20), (hTB_Ctrl), ParamSet )
  623. WSetActWnd (hTB20)
  624. WMenuSelect (MFILE + "\" + MEXIT, TIMEOUT)
  625. '******************************************************************************
  626. ' TC - 9 lineMakeCall - Privileges = none, monitor, owner *
  627. '******************************************************************************
  628. '--- Step 1, 2
  629. StartTAPIBrowser(hTB20, hTB_Ctrl, hTB_CtrlID)
  630. WritelogItem (" " , "")
  631. WritelogItem ("Test Case 9" , "")
  632. TC_ID = 9
  633. TotalScenarios = TotalScenarios + 1
  634. ParamSet = SetParamState (hTB20, UNCHECKED)
  635. rtn = Call_LInitialize ( (hTB20), (hTB_Ctrl), Paramset, hLineApp, Num_Dev )
  636. if rtn > 0 then
  637. WritelogItem ("lineInitialize failed error = " , ltrim$(hex$(rtn)))
  638. WritelogItem ("" , "This Test Will Terminate")
  639. end
  640. endif
  641. '--- Step 3, 4, 5, 6
  642. ParamSet = SetParamState (hTB20, CHECKED)
  643. ParamTraits(0).Param = "dwPrivileges"
  644. ParamTraits(0).BitFlagList = "NONE"
  645. ParamTraits(0).ValueEdit = ""
  646. ParamTraits(0).ValueList = ""
  647. rtn = Call_LOpen ( (hTB20), (hTB_Ctrl), ParamSet, lOpenRtn )
  648. if rtn > 0 then
  649. WritelogItem ("lineOpen failed error = " , ltrim$(hex$(rtn)))
  650. WritelogItem ("" , "This Test Will Terminate")
  651. end
  652. endif
  653. '--- Step 7, 8
  654. ParamTraits(0).Param = ""
  655. ParamTraits(0).BitFlagList = ""
  656. ParamTraits(0).ValueEdit = ""
  657. ParamTraits(0).ValueList = ""
  658. ReceiveState.Msg = "LINE_CALLSTATE"
  659. ReceiveState.device = ""
  660. ReceiveState.cbInst = ""
  661. ReceiveState.param1 = "PROCEEDING"
  662. ReceiveState.param2 = ""
  663. ReceiveState.param3 = ""
  664. rtn = Call_LMakeCall ( (hTB20), (hTB_Ctrl), ParamSet, ReceiveState, Returnstr )
  665. '--- Results 1
  666. teststring.TC_Num = 1
  667. teststring.Expect_Res = "PROCEEDING"
  668. teststring.Actual_Res =ReceiveState.param1
  669. TotalTestCases = TotalTestCases + 1
  670. if rtn = TRUE then
  671. teststring.Apprase = "Pass"
  672. else
  673. teststring.Apprase = "FAIL *"
  674. FailedTestCases = FailedTestCases + 1
  675. endif
  676. LogCase (teststring)
  677. '--- Step 9, 10
  678. ReceiveState.Msg = "LINE_CALLSTATE"
  679. ReceiveState.device = ""
  680. ReceiveState.cbInst = ""
  681. ReceiveState.param1 = "IDLE"
  682. ReceiveState.param2 = ""
  683. ReceiveState.param3 = ""
  684. rtn = Call_LDrop ( (hTB20), (hTB_Ctrl), ParamSet,ReceiveState )
  685. rtn = Call_lDeallocateCall ((hTB20), (hTB_Ctrl), ParamSet )
  686. '--- Step 11, 12
  687. rtn = Call_LClose ((hTB20), (hTB_Ctrl), ParamSet )
  688. '--- Step 13 through 15
  689. ParamTraits(0).Param = "dwPrivileges"
  690. ParamTraits(0).BitFlagList = "MONITOR"
  691. ParamTraits(0).ValueEdit = ""
  692. ParamTraits(0).ValueList = ""
  693. rtn = Call_LOpen ( (hTB20), (hTB_Ctrl), ParamSet, lOpenRtn )
  694. '--- Steps 16, 17
  695. ReceiveState.Msg = "LINE_CALLSTATE"
  696. ReceiveState.device = ""
  697. ReceiveState.cbInst = ""
  698. ReceiveState.param1 = "PROCEEDING"
  699. ReceiveState.param2 = ""
  700. ReceiveState.param3 = ""
  701. ParamTraits(0).Param = ""
  702. ParamTraits(0).BitFlagList = ""
  703. ParamTraits(0).ValueEdit = ""
  704. ParamTraits(0).ValueList = ""
  705. rtn = Call_LMakeCall ( (hTB20), (hTB_Ctrl), ParamSet, ReceiveState, Returnstr )
  706. '--- Results 2
  707. teststring.TC_Num = 2
  708. teststring.Expect_Res = "PROCEEDING"
  709. teststring.Actual_Res =ReceiveState.param1
  710. TotalTestCases = TotalTestCases + 1
  711. if rtn = TRUE then
  712. teststring.Apprase = "Pass"
  713. else
  714. teststring.Apprase = "FAIL *"
  715. FailedTestCases = FailedTestCases + 1
  716. endif
  717. LogCase (teststring)
  718. '--- Steps 18 through 21
  719. ReceiveState.Msg = "LINE_CALLSTATE"
  720. ReceiveState.device = ""
  721. ReceiveState.cbInst = ""
  722. ReceiveState.param1 = "IDLE"
  723. ReceiveState.param2 = ""
  724. ReceiveState.param3 = ""
  725. rtn = Call_LDrop ( (hTB20), (hTB_Ctrl), ParamSet,ReceiveState )
  726. rtn = Call_lDeallocateCall ((hTB20), (hTB_Ctrl), ParamSet )
  727. rtn = Call_LClose ((hTB20), (hTB_Ctrl), ParamSet )
  728. '--- Step 22 through 24
  729. ParamTraits(0).Param = "dwPrivileges"
  730. ParamTraits(0).BitFlagList = "OWNER"
  731. ParamTraits(0).ValueEdit = ""
  732. ParamTraits(0).ValueList = ""
  733. rtn = Call_LOpen ( (hTB20), (hTB_Ctrl), ParamSet, lOpenRtn )
  734. ParamTraits(0).Param = ""
  735. ParamTraits(0).BitFlagList = ""
  736. ParamTraits(0).ValueEdit = ""
  737. ParamTraits(0).ValueList = ""
  738. '--- Steps 25, 26
  739. ReceiveState.Msg = "LINE_CALLSTATE"
  740. ReceiveState.device = ""
  741. ReceiveState.cbInst = ""
  742. ReceiveState.param1 = "PROCEEDING"
  743. ReceiveState.param2 = ""
  744. ReceiveState.param3 = ""
  745. rtn = Call_LMakeCall ( (hTB20), (hTB_Ctrl), ParamSet, ReceiveState, Returnstr )
  746. '--- Results 3
  747. teststring.TC_Num = 3
  748. teststring.Expect_Res = "PROCEEDING"
  749. teststring.Actual_Res =ReceiveState.param1
  750. TotalTestCases = TotalTestCases + 1
  751. if rtn = TRUE then
  752. teststring.Apprase = "Pass"
  753. else
  754. teststring.Apprase = "FAIL *"
  755. FailedTestCases = FailedTestCases + 1
  756. endif
  757. LogCase (teststring)
  758. '--- Steps 27 through 28
  759. ParamSet = SetParamState (hTB20, UNCHECKED)
  760. ReceiveState.Msg = "LINE_CALLSTATE"
  761. ReceiveState.device = ""
  762. ReceiveState.cbInst = ""
  763. ReceiveState.param1 = "IDLE"
  764. ReceiveState.param2 = ""
  765. ReceiveState.param3 = ""
  766. rtn = Call_LDrop ( (hTB20), (hTB_Ctrl), ParamSet,ReceiveState )
  767. rtn = Call_lDeallocateCall ((hTB20), (hTB_Ctrl), ParamSet )
  768. rtn = Call_LClose ((hTB20), (hTB_Ctrl), ParamSet )
  769. rtn = Call_LShutDown ((hTB20), (hTB_Ctrl), ParamSet )
  770. WSetActWnd (hTB20)
  771. WMenuSelect (MFILE + "\" + MEXIT, TIMEOUT)
  772. '******************************************************************************
  773. ' TC - 10 lineMakeCall - Line unavalable *
  774. '******************************************************************************
  775. '--- Step 1, 2
  776. StartTAPIBrowser(hTB20, hTB_Ctrl, hTB_CtrlID)
  777. WritelogItem (" " , "")
  778. WritelogItem ("Test Case 10" , "")
  779. TC_ID = 10
  780. TotalScenarios = TotalScenarios + 1
  781. ParamSet = SetParamState (hTB20, UNCHECKED)
  782. rtn = Call_LInitialize ( (hTB20), (hTB_Ctrl), Paramset, hLineApp, Num_Dev )
  783. if rtn > 0 then
  784. WritelogItem ("Step 2 - lineInitialize failed error = " , ltrim$(hex$(rtn)))
  785. WritelogItem ("" , "This Test Will Terminate")
  786. end
  787. endif
  788. '--- Step 3
  789. rtn = Call_LOpen ( (hTB20), (hTB_Ctrl), ParamSet, lOpenRtn )
  790. if rtn > 0 then
  791. WritelogItem ("Step 3 - lineOpen failed error = " , ltrim$(hex$(rtn)))
  792. WritelogItem ("" , "This Test Will Terminate")
  793. end
  794. endif
  795. '--- Step 4
  796. ReceiveState.Msg = "LINE_CALLSTATE"
  797. ReceiveState.device = ""
  798. ReceiveState.cbInst = ""
  799. ReceiveState.param1 = "PROCEEDING"
  800. ReceiveState.param2 = ""
  801. ReceiveState.param3 = ""
  802. rtn = Call_LMakeCall ( (hTB20), (hTB_Ctrl), ParamSet, ReceiveState, Returnstr )
  803. 'if rtn > 0 then
  804. ' WritelogItem ("Step 4 - lineMakeCall failed error = " , ltrim$(hex$(rtn)))
  805. ' WritelogItem ("" , "This Test Will Terminate")
  806. ' end
  807. 'endif
  808. '--- Step 5
  809. rtn = Call_LInitialize ( (hTB20), (hTB_Ctrl), Paramset, hLineApp, Num_Dev )
  810. if rtn > 0 then
  811. WritelogItem ("Step 5 - lineInitialize failed error = " , ltrim$(hex$(rtn)))
  812. WritelogItem ("" , "This Test Will Terminate")
  813. end
  814. endif
  815. '--- Step 6
  816. rtn = Call_LOpen ( (hTB20), (hTB_Ctrl), ParamSet, lOpenRtn )
  817. if rtn > 0 then
  818. WritelogItem ("Step 6 - lineOpen failed error = " , ltrim$(hex$(rtn)))
  819. WritelogItem ("" , "This Test Will Terminate")
  820. end
  821. endif
  822. '--- Step 7
  823. ReceiveState.Msg = "LINE_CALLSTATE"
  824. ReceiveState.device = ""
  825. ReceiveState.cbInst = ""
  826. ReceiveState.param1 = "PROCEEDING"
  827. ReceiveState.param2 = ""
  828. ReceiveState.param3 = ""
  829. ReceiveState.ErrorStr = "LINEERR_CALLUNAVAIL"
  830. rtn = Call_LMakeCall ( (hTB20), (hTB_Ctrl), ParamSet, ReceiveState, Returnstr )
  831. '--- Results 1
  832. teststring.TC_Num = 1
  833. teststring.Expect_Res = "LINEERR_CALLUNAVAIL"
  834. teststring.Actual_Res =ReceiveState.ErrorStr
  835. TotalTestCases = TotalTestCases + 1
  836. if teststring.Actual_Res = teststring.Expect_Res then
  837. teststring.Apprase = "Pass"
  838. else
  839. teststring.Apprase = "FAIL *"
  840. FailedTestCases = FailedTestCases + 1
  841. endif
  842. LogCase (teststring)
  843. '--- Step 8, 9
  844. count = WListCount(_hwnd(hTB_Ctrl(TB_ResList)), TIMEOUT)
  845. WListItemClk (_hwnd(hTB_Ctrl(TB_ResList)), "@" + ltrim$(str$(count)), TIMEOUT)
  846. rtn = Call_LClose ((hTB20), (hTB_Ctrl), ParamSet )
  847. '--- Step 10, 11
  848. count = WListCount(_hwnd(hTB_Ctrl(TB_ResList)), TIMEOUT)
  849. WListItemClk (_hwnd(hTB_Ctrl(TB_ResList)), "@" + ltrim$(str$(count)), TIMEOUT)
  850. rtn = Call_LShutDown ((hTB20), (hTB_Ctrl), ParamSet )
  851. '--- Step 12 through 15
  852. ReceiveState.Msg = "LINE_CALLSTATE"
  853. ReceiveState.device = ""
  854. ReceiveState.cbInst = ""
  855. ReceiveState.param1 = "IDLE"
  856. ReceiveState.param2 = ""
  857. ReceiveState.param3 = ""
  858. rtn = Call_LDrop ( (hTB20), (hTB_Ctrl), ParamSet,ReceiveState )
  859. rtn = Call_lDeallocateCall ((hTB20), (hTB_Ctrl), ParamSet )
  860. rtn = Call_LClose ((hTB20), (hTB_Ctrl), ParamSet )
  861. rtn = Call_LShutDown ((hTB20), (hTB_Ctrl), ParamSet )
  862. WSetActWnd (hTB20)
  863. WMenuSelect (MFILE + "\" + MEXIT, TIMEOUT)
  864. '******************************************************************************
  865. ' TC - 26 lineGetTranslateCaps - determine SUCCESS and validity of
  866. ' RUN TC-26 BEFORE TC-21 TO GET THE CURRENT LOCATION ID
  867. '******************************************************************************
  868. StartTAPIBrowser(hTB20, hTB_Ctrl, hTB_CtrlID)
  869. WritelogItem (" " , "")
  870. WritelogItem ("Test Case 26" , "")
  871. WritelogItem ("RUN TC-26 BEFORE TC-21 TO", " GET THE CURRENT LOCATION ID")
  872. TC_ID = 26
  873. TotalScenarios = TotalScenarios + 1
  874. Returnstr = space$(1)
  875. rtn = Call_LGetTranslateCaps ( (hTB20), (hTB_Ctrl), Paramset, Returnstr )
  876. teststring.TC_Num = 1
  877. teststring.Expect_Res = "LineGetTranslateCaps Rtn SUCCESS"
  878. teststring.Actual_Res = LineReturnString ( rtn )
  879. TotalTestCases = TotalTestCases + 1
  880. if rtn > 0 then
  881. teststring.Apprase = "FAIL *"
  882. FailedTestCases = FailedTestCases + 1
  883. else
  884. teststring.Apprase = "Pass"
  885. rtn = instr(1, Returnstr, "dwPermanentLocationID")
  886. if rtn > 0 then ' Get the first location ID
  887. rtn = instr(rtn, Returnstr, "=x")
  888. CurCountryID = mid$(Returnstr, rtn + 2, instr(rtn, Returnstr, CRLF) - (rtn + 2) )
  889. endif
  890. rtn = instr(1, Returnstr, "dwPermanentCardID")
  891. if rtn > 0 then ' Get the first Credit Card ID
  892. rtn = instr(rtn, Returnstr, "=x")
  893. CreditCardID = mid$(Returnstr, rtn + 2, instr(rtn, Returnstr, CRLF) - (rtn + 2) )
  894. endif
  895. endif
  896. LogCase (teststring)
  897. WSetActWnd (hTB20)
  898. WMenuSelect (MFILE + "\" + MEXIT, TIMEOUT)
  899. '******************************************************************************
  900. ' TC - 21 lineSetCurrentLocation With valid and invalid Location IDs *
  901. '******************************************************************************
  902. 'Note: This test requires a valid Country ID which is returned by TC 26
  903. '--- Step 1
  904. if Val( CurCountryID) > 0 then 'continue with test
  905. StartTAPIBrowser(hTB20, hTB_Ctrl, hTB_CtrlID)
  906. WritelogItem (" " , "")
  907. WritelogItem ("Test Case 21" , "")
  908. TC_ID = 21
  909. TotalScenarios = TotalScenarios + 1
  910. '--- Steps 2, 3
  911. ParamSet = SetParamState (hTB20, UNCHECKED)
  912. rtn = Call_LInitialize ( (hTB20), (hTB_Ctrl), Paramset, hLineApp, Num_Dev )
  913. if rtn > 0 then
  914. WritelogItem ("Step 2 - lineInitialize failed error = " , ltrim$(hex$(rtn)))
  915. WritelogItem ("" , "This Test Will Terminate")
  916. end
  917. endif
  918. ParamSet = SetParamState (hTB20, CHECKED)
  919. ParamTraits(0).Param = "dwLocation"
  920. ParamTraits(0).BitFlagList = ""
  921. ParamTraits(0).ValueEdit = CurCountryID
  922. ParamTraits(0).ValueList = ""
  923. Returnstr = " "
  924. rtn = Call_LSetCurrentLocation ( (hTB20), (hTB_Ctrl), Paramset, CurCountryID, Returnstr )
  925. '--- Results 1
  926. teststring.TC_Num = 1
  927. teststring.Expect_Res = "LineSetCurrentLoc Rtn SUCCESS"
  928. teststring.Actual_Res = LineReturnString ( rtn )
  929. TotalTestCases = TotalTestCases + 1
  930. if rtn > 0 then
  931. teststring.Apprase = "FAIL *"
  932. FailedTestCases = FailedTestCases + 1
  933. else
  934. teststring.Apprase = "Pass"
  935. rtn = instr(1, Returnstr, "dwPermanentLocationID")
  936. if rtn > 0 then
  937. rtn = instr(rtn, Returnstr, "=x")
  938. CurCountryID = mid$(Returnstr, rtn + 2, instr(rtn, Returnstr, CRLF) - (rtn + 2) )
  939. endif
  940. endif
  941. LogCase (teststring)
  942. '--- Results 2
  943. ReceiveState.Msg = "LINE_LINEDEVSTATE"
  944. ReceiveState.device = ""
  945. ReceiveState.cbInst = ""
  946. ReceiveState.param1 = ""
  947. ReceiveState.param2 = ""
  948. ReceiveState.param3 = ""
  949. do
  950. rtn = instr(1, Returnstr, ReceiveState.Msg)
  951. if rtn > 0 then
  952. rtn = MsgSplitter (Returnstr, ReceiveState)
  953. endif
  954. loop until rtn = 0 OR ReceiveState.param1 = "REINIT"
  955. teststring.TC_Num = 2
  956. teststring.Expect_Res = "LINE_LINEDEVSTATE = REINIT"
  957. teststring.Actual_Res = ReceiveState.param1
  958. TotalTestCases = TotalTestCases + 1
  959. if instr(1, ReceiveState.param1, "REINIT") > 0 then
  960. teststring.Apprase = "Pass"
  961. else
  962. teststring.Apprase = "FAIL *"
  963. FailedTestCases = FailedTestCases + 1
  964. endif
  965. LogCase (teststring)
  966. endif
  967. '--- Steps 8 through 11
  968. ParamTraits(0).Param = "dwLocation"
  969. ParamTraits(0).BitFlagList = ""
  970. ParamTraits(0).ValueEdit = "ffffffff"
  971. ParamTraits(0).ValueList = ""
  972. Returnstr = " "
  973. rtn = Call_LSetCurrentLocation ( (hTB20), (hTB_Ctrl), Paramset, CurCountryID, Returnstr )
  974. '--- Results 3
  975. teststring.TC_Num = 3
  976. teststring.Expect_Res = "Rtn LINEERR_INVALLOCATION"
  977. teststring.Actual_Res = LineReturnString ( rtn )
  978. TotalTestCases = TotalTestCases + 1
  979. if rtn = LINEERR_INVALLOCATION then
  980. teststring.Apprase = "Pass"
  981. else
  982. teststring.Apprase = "FAIL *"
  983. FailedTestCases = FailedTestCases + 1
  984. endif
  985. LogCase (teststring)
  986. ParamSet = SetParamState (hTB20, UNCHECKED)
  987. rtn = Call_LShutDown ((hTB20), (hTB_Ctrl), ParamSet )
  988. WSetActWnd (hTB20)
  989. WMenuSelect (MFILE + "\" + MEXIT, TIMEOUT)
  990. '******************************************************************************
  991. ' TC - 22 lineGetCountry *
  992. '******************************************************************************
  993. '--- Steps 1 through 6
  994. StartTAPIBrowser(hTB20, hTB_Ctrl, hTB_CtrlID)
  995. WritelogItem (" " , "")
  996. WritelogItem ("Test Case 22" , "")
  997. TC_ID = 22
  998. TotalScenarios = TotalScenarios + 1
  999. ParamSet = SetParamState (hTB20, CHECKED)
  1000. ParamTraits(0).Param = "dwCountryID"
  1001. ParamTraits(0).BitFlagList = ""
  1002. ParamTraits(0).ValueEdit = "0"
  1003. ParamTraits(0).ValueList = ""
  1004. Returnstr = " "
  1005. rtn = Call_LGetCountry ( (hTB20), (hTB_Ctrl), Paramset, Returnstr )
  1006. '--- Results 1
  1007. teststring.TC_Num = 1
  1008. teststring.Expect_Res = "LineGetCountry Rtn SUCCESS"
  1009. teststring.Actual_Res = LineReturnString ( rtn )
  1010. TotalTestCases = TotalTestCases + 1
  1011. if rtn = 0 then
  1012. teststring.Apprase = "Pass"
  1013. else
  1014. teststring.Apprase = "FAIL *"
  1015. FailedTestCases = FailedTestCases + 1
  1016. endif
  1017. LogCase (teststring)
  1018. '--- Steps 7 through 10
  1019. ParamTraits(0).Param = "dwCountryID"
  1020. ParamTraits(0).BitFlagList = ""
  1021. ParamTraits(0).ValueEdit = "161"
  1022. ParamTraits(0).ValueList = ""
  1023. Returnstr = " "
  1024. rtn = Call_LGetCountry ( (hTB20), (hTB_Ctrl), Paramset, Returnstr )
  1025. '--- Results 2
  1026. teststring.TC_Num = 2
  1027. teststring.Expect_Res = "SUCCESS"
  1028. teststring.Actual_Res = LineReturnString ( rtn )
  1029. TotalTestCases = TotalTestCases + 1
  1030. if rtn = 0 then
  1031. teststring.Apprase = "Pass"
  1032. else
  1033. teststring.Apprase = "FAIL *"
  1034. FailedTestCases = FailedTestCases + 1
  1035. endif
  1036. LogCase (teststring)
  1037. '--- Steps 11 through 14
  1038. ParamTraits(0).Param = "dwCountryID"
  1039. ParamTraits(0).BitFlagList = ""
  1040. ParamTraits(0).ValueEdit = "ffffffff"
  1041. ParamTraits(0).ValueList = ""
  1042. Returnstr = " "
  1043. rtn = Call_LGetCountry ( (hTB20), (hTB_Ctrl), Paramset, Returnstr )
  1044. '--- Results 3
  1045. teststring.TC_Num = 3
  1046. teststring.Expect_Res = "LINEERR_INVALCOUNTRYCODE"
  1047. teststring.Actual_Res = LineReturnString ( rtn )
  1048. TotalTestCases = TotalTestCases + 1
  1049. if rtn = LINEERR_INVALCOUNTRYCODE then
  1050. teststring.Apprase = "Pass"
  1051. else
  1052. teststring.Apprase = "FAIL *"
  1053. FailedTestCases = FailedTestCases + 1
  1054. endif
  1055. LogCase (teststring)
  1056. '--- Step 15
  1057. ParamSet = SetParamState (hTB20, UNCHECKED)
  1058. WSetActWnd (hTB20)
  1059. WMenuSelect (MFILE + "\" + MEXIT, TIMEOUT)
  1060. '******************************************************************************
  1061. ' TC - 27 lineTranslateAddress - valid and invalid addresses *
  1062. '******************************************************************************
  1063. '--- Steps 1
  1064. StartTAPIBrowser(hTB20, hTB_Ctrl, hTB_CtrlID)
  1065. WritelogItem (" " , "")
  1066. WritelogItem ("Test Case 27" , "")
  1067. TC_ID = 27
  1068. TotalScenarios = TotalScenarios + 1
  1069. '--- Step 2
  1070. rtn = Call_LInitialize ( (hTB20), (hTB_Ctrl), Paramset, hLineApp, Num_Dev )
  1071. if rtn > 0 then
  1072. WritelogItem ("Step 2 - lineInitialize failed error = " , ltrim$(hex$(rtn)))
  1073. WritelogItem ("" , "This Test Will Terminate")
  1074. end
  1075. endif
  1076. '--- Steps 3 through 9 Canonical format address
  1077. ParamSet = SetParamState (hTB20, CHECKED)
  1078. redim (ParamTraits) (0 to 1) as ParamAttributes
  1079. ParamTraits(0).Param = "dwTranslateOptions"
  1080. ParamTraits(0).BitFlagList = ""
  1081. ParamTraits(0).ValueEdit = ""
  1082. ParamTraits(0).ValueList = "select none"
  1083. ParamTraits(1).Param = "lpszAddressIn"
  1084. ParamTraits(1).BitFlagList = ""
  1085. ParamTraits(1).ValueEdit = "+1(206)543-9876"
  1086. ParamTraits(1).ValueList = ""
  1087. rtn = Call_LTranslateAddress ( (hTB20), (hTB_Ctrl), Paramset, Returnstr )
  1088. '--- Results 1
  1089. teststring.TC_Num = 1
  1090. teststring.Expect_Res = "SUCCESS"
  1091. teststring.Actual_Res = LineReturnString ( rtn )
  1092. TotalTestCases = TotalTestCases + 1
  1093. if rtn = 0 then
  1094. teststring.Apprase = "Pass"
  1095. else
  1096. teststring.Apprase = "FAIL *"
  1097. FailedTestCases = FailedTestCases + 1
  1098. endif
  1099. LogCase (teststring)
  1100. '--- Steps 11 through 16 Dialable Format Address
  1101. ParamTraits(0).Param = "dwTranslateOptions"
  1102. ParamTraits(0).BitFlagList = ""
  1103. ParamTraits(0).ValueEdit = ""
  1104. ParamTraits(0).ValueList = "select none"
  1105. ParamTraits(1).Param = "lpszAddressIn"
  1106. ParamTraits(1).BitFlagList = ""
  1107. ParamTraits(1).ValueEdit = "206 777-8888"
  1108. ParamTraits(1).ValueList = ""
  1109. rtn = Call_LTranslateAddress ( (hTB20), (hTB_Ctrl), Paramset, Returnstr )
  1110. '--- Results 2
  1111. teststring.TC_Num = 2
  1112. teststring.Expect_Res = "SUCCESS"
  1113. teststring.Actual_Res = LineReturnString ( rtn )
  1114. TotalTestCases = TotalTestCases + 1
  1115. if rtn = 0 then
  1116. teststring.Apprase = "Pass"
  1117. else
  1118. teststring.Apprase = "FAIL *"
  1119. FailedTestCases = FailedTestCases + 1
  1120. endif
  1121. LogCase (teststring)
  1122. '--- Steps 17 through 22 Invalid Address
  1123. ParamTraits(1).Param = "lpszAddressIn"
  1124. ParamTraits(1).BitFlagList = ""
  1125. ParamTraits(1).ValueEdit = ""
  1126. ParamTraits(1).ValueList = "Invalid string pointer"
  1127. rtn = Call_LTranslateAddress ( (hTB20), (hTB_Ctrl), Paramset, Returnstr )
  1128. '--- Results 3
  1129. teststring.TC_Num = 3
  1130. teststring.Expect_Res = "LINEERR_INVALPOINTER"
  1131. teststring.Actual_Res = LineReturnString ( rtn )
  1132. TotalTestCases = TotalTestCases + 1
  1133. if rtn = LINEERR_INVALPOINTER then
  1134. teststring.Apprase = "Pass"
  1135. else
  1136. teststring.Apprase = "FAIL *"
  1137. FailedTestCases = FailedTestCases + 1
  1138. endif
  1139. LogCase (teststring)
  1140. '******************* Added to Regress Failure 49XXX ******************************
  1141. '--- Steps 11 through 16 Canonacal Format International Address with no city code
  1142. ParamTraits(0).Param = "dwTranslateOptions"
  1143. ParamTraits(0).BitFlagList = ""
  1144. ParamTraits(0).ValueEdit = ""
  1145. ParamTraits(0).ValueList = "select none"
  1146. '--- Test 1
  1147. ParamTraits(1).Param = "lpszAddressIn"
  1148. ParamTraits(1).BitFlagList = ""
  1149. ParamTraits(1).ValueEdit = "+852()777-8888"
  1150. ParamTraits(1).ValueList = ""
  1151. rtn = Call_LTranslateAddress ( (hTB20), (hTB_Ctrl), Paramset, Returnstr )
  1152. '--- Results 4
  1153. teststring.TC_Num = teststring.TC_Num + 1
  1154. teststring.Expect_Res = "SUCCESS"
  1155. teststring.Actual_Res = LineReturnString ( rtn )
  1156. TotalTestCases = TotalTestCases + 1
  1157. if rtn = 0 then
  1158. teststring.Apprase = "Pass"
  1159. else
  1160. teststring.Apprase = "FAIL *"
  1161. FailedTestCases = FailedTestCases + 1
  1162. endif
  1163. LogCase (teststring)
  1164. '--- Test 2
  1165. ParamTraits(1).Param = "lpszAddressIn"
  1166. ParamTraits(1).BitFlagList = ""
  1167. ParamTraits(1).ValueEdit = "+852 ()777-8888"
  1168. ParamTraits(1).ValueList = ""
  1169. rtn = Call_LTranslateAddress ( (hTB20), (hTB_Ctrl), Paramset, Returnstr )
  1170. '--- Results 4
  1171. teststring.TC_Num = teststring.TC_Num + 1
  1172. teststring.Expect_Res = "SUCCESS"
  1173. teststring.Actual_Res = LineReturnString ( rtn )
  1174. TotalTestCases = TotalTestCases + 1
  1175. if rtn = 0 then
  1176. teststring.Apprase = "Pass"
  1177. else
  1178. teststring.Apprase = "FAIL *"
  1179. FailedTestCases = FailedTestCases + 1
  1180. endif
  1181. LogCase (teststring)
  1182. '--- Test 3
  1183. ParamTraits(1).Param = "lpszAddressIn"
  1184. ParamTraits(1).BitFlagList = ""
  1185. ParamTraits(1).ValueEdit = "+852() 777-8888"
  1186. ParamTraits(1).ValueList = ""
  1187. rtn = Call_LTranslateAddress ( (hTB20), (hTB_Ctrl), Paramset, Returnstr )
  1188. '--- Results 4
  1189. teststring.TC_Num = teststring.TC_Num + 1
  1190. teststring.Expect_Res = "SUCCESS"
  1191. teststring.Actual_Res = LineReturnString ( rtn )
  1192. TotalTestCases = TotalTestCases + 1
  1193. if rtn = 0 then
  1194. teststring.Apprase = "Pass"
  1195. else
  1196. teststring.Apprase = "FAIL *"
  1197. FailedTestCases = FailedTestCases + 1
  1198. endif
  1199. LogCase (teststring)
  1200. '--- Test 4
  1201. ParamTraits(1).Param = "lpszAddressIn"
  1202. ParamTraits(1).BitFlagList = ""
  1203. ParamTraits(1).ValueEdit = "+852 () 777-8888"
  1204. ParamTraits(1).ValueList = ""
  1205. rtn = Call_LTranslateAddress ( (hTB20), (hTB_Ctrl), Paramset, Returnstr )
  1206. '--- Results 4
  1207. teststring.TC_Num = teststring.TC_Num + 1
  1208. teststring.Expect_Res = "SUCCESS"
  1209. teststring.Actual_Res = LineReturnString ( rtn )
  1210. TotalTestCases = TotalTestCases + 1
  1211. if rtn = 0 then
  1212. teststring.Apprase = "Pass"
  1213. else
  1214. teststring.Apprase = "FAIL *"
  1215. FailedTestCases = FailedTestCases + 1
  1216. endif
  1217. LogCase (teststring)
  1218. '--- Test 5
  1219. ParamTraits(1).Param = "lpszAddressIn"
  1220. ParamTraits(1).BitFlagList = ""
  1221. ParamTraits(1).ValueEdit = "+852 777-8888"
  1222. ParamTraits(1).ValueList = ""
  1223. rtn = Call_LTranslateAddress ( (hTB20), (hTB_Ctrl), Paramset, Returnstr )
  1224. '--- Results 4
  1225. teststring.TC_Num = teststring.TC_Num + 1
  1226. teststring.Expect_Res = "SUCCESS"
  1227. teststring.Actual_Res = LineReturnString ( rtn )
  1228. TotalTestCases = TotalTestCases + 1
  1229. if rtn = 0 then
  1230. teststring.Apprase = "Pass"
  1231. else
  1232. teststring.Apprase = "FAIL *"
  1233. FailedTestCases = FailedTestCases + 1
  1234. endif
  1235. LogCase (teststring)
  1236. '*********************************************************************************
  1237. '--- Steps 23 through 25 Test Case shutdown
  1238. ParamSet = SetParamState (hTB20, UNCHECKED)
  1239. rtn = Call_LShutDown ((hTB20), (hTB_Ctrl), ParamSet )
  1240. WSetActWnd (hTB20)
  1241. WMenuSelect (MFILE + "\" + MEXIT, TIMEOUT)
  1242. '******************************************************************************
  1243. ' TC - 28 lineTranslateAddress - valid and invalid credit cards *
  1244. '******************************************************************************
  1245. 'Note: Tis test requires a valid Credit Card ID which is returned by TC - 26
  1246. '--- Steps 1 through
  1247. StartTAPIBrowser(hTB20, hTB_Ctrl, hTB_CtrlID)
  1248. WritelogItem (" " , "")
  1249. WritelogItem ("Test Case 28" , "")
  1250. TC_ID = 28
  1251. TotalScenarios = TotalScenarios + 1
  1252. '--- Step 2
  1253. rtn = Call_LInitialize ( (hTB20), (hTB_Ctrl), Paramset, hLineApp, Num_Dev )
  1254. if rtn > 0 then
  1255. WritelogItem ("Step 2 - lineInitialize failed error = " , ltrim$(hex$(rtn)))
  1256. WritelogItem ("" , "This Test Will Terminate")
  1257. end
  1258. endif
  1259. '--- Steps 3 through 7
  1260. ParamSet = SetParamState (hTB20, CHECKED)
  1261. ParamTraits(0).Param = "dwCard"
  1262. ParamTraits(0).BitFlagList = ""
  1263. ParamTraits(0).ValueEdit = CreditCardID
  1264. ParamTraits(0).ValueList = ""
  1265. redim (ParamTraits) (0) as ParamAttributes
  1266. rtn = Call_LTranslateAddress ( (hTB20), (hTB_Ctrl), Paramset, Returnstr )
  1267. '--- Results 1
  1268. teststring.TC_Num = 1
  1269. teststring.Expect_Res = "SUCCESS"
  1270. teststring.Actual_Res = LineReturnString ( rtn )
  1271. TotalTestCases = TotalTestCases + 1
  1272. if rtn = 0 then
  1273. teststring.Apprase = "Pass"
  1274. else
  1275. teststring.Apprase = "FAIL *"
  1276. FailedTestCases = FailedTestCases + 1
  1277. endif
  1278. LogCase (teststring)
  1279. '--- Steps 8 through 11
  1280. ParamTraits(0).Param = "dwCard"
  1281. ParamTraits(0).BitFlagList = ""
  1282. ParamTraits(0).ValueEdit = "ffffffff"
  1283. ParamTraits(0).ValueList = ""
  1284. rtn = Call_LTranslateAddress ( (hTB20), (hTB_Ctrl), Paramset, Returnstr )
  1285. '--- Results 2
  1286. teststring.TC_Num = 2
  1287. teststring.Expect_Res = "LINEERR_INVALCARD"
  1288. teststring.Actual_Res = LineReturnString ( rtn )
  1289. TotalTestCases = TotalTestCases + 1
  1290. if rtn = LINEERR_INVALCARD then
  1291. teststring.Apprase = "Pass"
  1292. else
  1293. teststring.Apprase = "FAIL *"
  1294. FailedTestCases = FailedTestCases + 1
  1295. endif
  1296. LogCase (teststring)
  1297. '--- Steps 12 through 14
  1298. ParamSet = SetParamState (hTB20, UNCHECKED)
  1299. rtn = Call_LShutDown ((hTB20), (hTB_Ctrl), ParamSet )
  1300. WSetActWnd (hTB20)
  1301. WMenuSelect (MFILE + "\" + MEXIT, TIMEOUT)
  1302. '******************************************************************************
  1303. ' TC - 29 lineTranslateAddress - valid and invalid translate options *
  1304. '******************************************************************************
  1305. '--- Steps 1 through 6
  1306. StartTAPIBrowser(hTB20, hTB_Ctrl, hTB_CtrlID)
  1307. WritelogItem (" " , "")
  1308. WritelogItem ("Test Case 29" , "")
  1309. TC_ID = 29
  1310. TotalScenarios = TotalScenarios + 1
  1311. '--- Step 2
  1312. rtn = Call_LInitialize ( (hTB20), (hTB_Ctrl), Paramset, hLineApp, Num_Dev )
  1313. if rtn > 0 then
  1314. WritelogItem ("Step 2 - lineInitialize failed error = " , ltrim$(hex$(rtn)))
  1315. WritelogItem ("" , "This Test Will Terminate")
  1316. end
  1317. endif
  1318. '--- Steps 3 through 7
  1319. ParamSet = SetParamState (hTB20, CHECKED)
  1320. ParamTraits(0).Param = "dwTranslateOptions"
  1321. ParamTraits(0).BitFlagList = ""
  1322. ParamTraits(0).ValueEdit = ""
  1323. ParamTraits(0).ValueList = "select none"
  1324. rtn = Call_LTranslateAddress ( (hTB20), (hTB_Ctrl), Paramset, Returnstr )
  1325. '--- Results 1
  1326. teststring.TC_Num = 1
  1327. teststring.Expect_Res = "SUCCESS"
  1328. teststring.Actual_Res = LineReturnString ( rtn )
  1329. TotalTestCases = TotalTestCases + 1
  1330. if rtn = 0 then
  1331. teststring.Apprase = "Pass"
  1332. else
  1333. teststring.Apprase = "FAIL *"
  1334. FailedTestCases = FailedTestCases + 1
  1335. endif
  1336. LogCase (teststring)
  1337. '--- Steps 8 through 12
  1338. redim (ParamTraits) (0 to 1) as ParamAttributes
  1339. ParamTraits(0).Param = "dwTranslateOptions"
  1340. ParamTraits(0).BitFlagList = "CARDOVERRIDE"
  1341. ParamTraits(0).ValueEdit = ""
  1342. ParamTraits(0).ValueList = ""
  1343. ParamTraits(1).Param = ""
  1344. ParamTraits(1).BitFlagList = "CANCELCALLWAITING"
  1345. ParamTraits(1).ValueEdit = ""
  1346. ParamTraits(1).ValueList = ""
  1347. rtn = Call_LTranslateAddress ( (hTB20), (hTB_Ctrl), Paramset, Returnstr )
  1348. '--- Results 2
  1349. teststring.TC_Num = 2
  1350. teststring.Expect_Res = "SUCCESS"
  1351. teststring.Actual_Res = LineReturnString ( rtn )
  1352. TotalTestCases = TotalTestCases + 1
  1353. if rtn = 0 then
  1354. teststring.Apprase = "Pass"
  1355. else
  1356. teststring.Apprase = "FAIL *"
  1357. FailedTestCases = FailedTestCases + 1
  1358. endif
  1359. LogCase (teststring)
  1360. '--- Steps 13 through 17
  1361. redim (ParamTraits) (0) as ParamAttributes
  1362. ParamTraits(0).Param = "dwTranslateOptions"
  1363. ParamTraits(0).BitFlagList = "FORCELOCAL"
  1364. ParamTraits(0).ValueEdit = ""
  1365. ParamTraits(0).ValueList = ""
  1366. rtn = Call_LTranslateAddress ( (hTB20), (hTB_Ctrl), Paramset, Returnstr )
  1367. '--- Results 3
  1368. teststring.TC_Num = 3
  1369. teststring.Expect_Res = "SUCCESS"
  1370. teststring.Actual_Res = LineReturnString ( rtn )
  1371. TotalTestCases = TotalTestCases + 1
  1372. if rtn = 0 then
  1373. teststring.Apprase = "Pass"
  1374. else
  1375. teststring.Apprase = "FAIL *"
  1376. FailedTestCases = FailedTestCases + 1
  1377. endif
  1378. LogCase (teststring)
  1379. '--- Steps 18 through 22
  1380. ParamTraits(0).Param = "dwTranslateOptions"
  1381. ParamTraits(0).BitFlagList = "FORCELD"
  1382. ParamTraits(0).ValueEdit = ""
  1383. ParamTraits(0).ValueList = ""
  1384. rtn = Call_LTranslateAddress ( (hTB20), (hTB_Ctrl), Paramset, Returnstr )
  1385. '--- Results 4
  1386. teststring.TC_Num = 4
  1387. teststring.Expect_Res = "SUCCESS"
  1388. teststring.Actual_Res = LineReturnString ( rtn )
  1389. TotalTestCases = TotalTestCases + 1
  1390. if rtn = 0 then
  1391. teststring.Apprase = "Pass"
  1392. else
  1393. teststring.Apprase = "FAIL *"
  1394. FailedTestCases = FailedTestCases + 1
  1395. endif
  1396. LogCase (teststring)
  1397. '--- Steps 23 through 28
  1398. redim (ParamTraits) (0 TO 1) as ParamAttributes
  1399. ParamTraits(0).Param = "dwTranslateOptions"
  1400. ParamTraits(0).BitFlagList = "FORCELOCAL"
  1401. ParamTraits(0).ValueEdit = ""
  1402. ParamTraits(0).ValueList = ""
  1403. ParamTraits(1).Param = ""
  1404. ParamTraits(1).BitFlagList = "FORCELD"
  1405. ParamTraits(1).ValueEdit = ""
  1406. ParamTraits(1).ValueList = ""
  1407. rtn = Call_LTranslateAddress ( (hTB20), (hTB_Ctrl), Paramset, Returnstr )
  1408. '--- Results 5
  1409. teststring.TC_Num = 5
  1410. teststring.Expect_Res = "LINEERR_INVALPARAM"
  1411. teststring.Actual_Res = LineReturnString ( rtn )
  1412. TotalTestCases = TotalTestCases + 1
  1413. if rtn = LINEERR_INVALPARAM then
  1414. teststring.Apprase = "Pass"
  1415. else
  1416. teststring.Apprase = "FAIL *"
  1417. FailedTestCases = FailedTestCases + 1
  1418. endif
  1419. LogCase (teststring)
  1420. '--- Steps 29 through 31
  1421. ParamSet = SetParamState (hTB20, UNCHECKED)
  1422. rtn = Call_LShutDown ((hTB20), (hTB_Ctrl), ParamSet )
  1423. WSetActWnd (hTB20)
  1424. WMenuSelect (MFILE + "\" + MEXIT, TIMEOUT)
  1425. '******************************************************************************
  1426. ' TC - 31 lineConfigDialog verify popup *
  1427. '******************************************************************************
  1428. '--- Step 1
  1429. StartTAPIBrowser(hTB20, hTB_Ctrl, hTB_CtrlID)
  1430. WritelogItem (" " , "")
  1431. WritelogItem ("Test Case 31" , "")
  1432. TC_ID = 31
  1433. TotalScenarios = TotalScenarios + 1
  1434. '--- Step 2
  1435. rtn = Call_LInitialize ( (hTB20), (hTB_Ctrl), Paramset, hLineApp, Num_Dev )
  1436. if rtn > 0 then
  1437. WritelogItem ("Step 2 - lineInitialize failed error = " , ltrim$(hex$(rtn)))
  1438. WritelogItem ("" , "This Test Will Terminate")
  1439. end
  1440. endif
  1441. ParamSet = SetParamState (hTB20, UNCHECKED)
  1442. '--- Step 3, 4
  1443. hDlg = 0
  1444. rtn = Call_LConfigDialog ( (hTB20), (hTB_Ctrl), Paramset, hDlg, ModemName )
  1445. '--- Results 1
  1446. teststring.TC_Num = 1
  1447. teststring.Expect_Res = "Valid Modem Prop. Handle"
  1448. teststring.Actual_Res = ltrim$(hex$(hDlg))
  1449. TotalTestCases = TotalTestCases + 1
  1450. if hDlg <> 0 then
  1451. teststring.Apprase = "Pass"
  1452. else
  1453. teststring.Apprase = "FAIL *"
  1454. FailedTestCases = FailedTestCases + 1
  1455. endif
  1456. LogCase (teststring)
  1457. '--- Results 2
  1458. teststring.TC_Num = 2
  1459. teststring.Expect_Res = "SUCCESS"
  1460. teststring.Actual_Res = LineReturnString ( rtn )
  1461. TotalTestCases = TotalTestCases + 1
  1462. if rtn = 0 then
  1463. teststring.Apprase = "Pass"
  1464. else
  1465. teststring.Apprase = "FAIL *"
  1466. FailedTestCases = FailedTestCases + 1
  1467. endif
  1468. LogCase (teststring)
  1469. '--- Step 5, 6
  1470. rtn = Call_LShutDown ((hTB20), (hTB_Ctrl), ParamSet )
  1471. WSetActWnd (hTB20)
  1472. WMenuSelect (MFILE + "\" + MEXIT, TIMEOUT)
  1473. '******************************************************************************
  1474. ' TC - 32 lineTranslateDialog verify popup *
  1475. '******************************************************************************
  1476. '--- Step 1 through 3
  1477. StartTAPIBrowser(hTB20, hTB_Ctrl, hTB_CtrlID)
  1478. WritelogItem (" " , "")
  1479. WritelogItem ("Test Case 32" , "")
  1480. TC_ID = 32
  1481. TotalScenarios = TotalScenarios + 1
  1482. ParamSet = SetParamState (hTB20, UNCHECKED)
  1483. hDlg = 0
  1484. rtn = Call_LTranslateDialog ( (hTB20), (hTB_Ctrl), hDlg, Paramset )
  1485. '--- Results 1
  1486. teststring.TC_Num = 1
  1487. teststring.Expect_Res = "Valid Dialing Prop. Handle"
  1488. teststring.Actual_Res = ltrim$(hex$(hDlg))
  1489. TotalTestCases = TotalTestCases + 1
  1490. if hDlg <> 0 then
  1491. teststring.Apprase = "Pass"
  1492. else
  1493. teststring.Apprase = "FAIL *"
  1494. FailedTestCases = FailedTestCases + 1
  1495. endif
  1496. LogCase (teststring)
  1497. '--- Results 2
  1498. teststring.TC_Num = 2
  1499. teststring.Expect_Res = "SUCCESS"
  1500. teststring.Actual_Res = LineReturnString ( rtn )
  1501. TotalTestCases = TotalTestCases + 1
  1502. if rtn = 0 then
  1503. teststring.Apprase = "Pass"
  1504. else
  1505. teststring.Apprase = "FAIL *"
  1506. FailedTestCases = FailedTestCases + 1
  1507. endif
  1508. LogCase (teststring)
  1509. '--- Steps 5 through 7
  1510. '--- Results 3
  1511. '--- Step 8
  1512. WSetActWnd (hTB20)
  1513. WMenuSelect (MFILE + "\" + MEXIT, TIMEOUT)
  1514. '******************************************************************************
  1515. ' TC - 80 lineDial *
  1516. '******************************************************************************
  1517. '--- Step 1 through 2
  1518. StartTAPIBrowser(hTB20, hTB_Ctrl, hTB_CtrlID)
  1519. WritelogItem (" " , "")
  1520. WritelogItem ("Test Case 80" , "")
  1521. TC_ID = 80
  1522. TotalScenarios = TotalScenarios + 1
  1523. ParamSet = SetParamState (hTB20, UNCHECKED)
  1524. rtn = Call_LInitialize ( (hTB20), (hTB_Ctrl), Paramset, hLineApp, Num_Dev )
  1525. if rtn > 0 then
  1526. WritelogItem ("Step 5 - lineInitialize failed error = " , ltrim$(hex$(rtn)))
  1527. WritelogItem ("" , "This Test Will Terminate")
  1528. end
  1529. endif
  1530. rtn = Call_LOpen ( (hTB20), (hTB_Ctrl), ParamSet, lOpenRtn )
  1531. if rtn > 0 then
  1532. WritelogItem ("Step 6 - lineOpen failed error = " , ltrim$(hex$(rtn)))
  1533. WritelogItem ("" , "This Test Will Terminate")
  1534. end
  1535. endif
  1536. ParamSet = SetParamState (hTB20, CHECKED)
  1537. '--- Step 3
  1538. redim (ParamTraits) (0) as ParamAttributes
  1539. ParamTraits(0).Param = "lpszDestAddress"
  1540. ParamTraits(0).BitFlagList = ""
  1541. ParamTraits(0).ValueEdit = ""
  1542. ParamTraits(0).ValueList = "NULL pointer"
  1543. ReceiveState.Msg = ""
  1544. ReceiveState.device = ""
  1545. ReceiveState.cbInst = ""
  1546. ReceiveState.param1 = ""
  1547. ReceiveState.param2 = ""
  1548. ReceiveState.param3 = ""
  1549. ReceiveState.ErrorStr = ""
  1550. rtn = Call_LMakeCall ( (hTB20), (hTB_Ctrl), ParamSet, ReceiveState, Returnstr )
  1551. ParamTraits(0).Param = "lpszDestAddress"
  1552. ParamTraits(0).BitFlagList = ""
  1553. ParamTraits(0).ValueEdit = "55555"
  1554. ParamTraits(0).ValueList = ""
  1555. rtn = Call_LDial ( (hTB20), (hTB_Ctrl), ParamSet, hDlg )
  1556. '--- Results 1
  1557. teststring.TC_Num = 1
  1558. teststring.Expect_Res = "Valid Call Status Handle"
  1559. teststring.Actual_Res = ltrim$(hex$(hDlg))
  1560. TotalTestCases = TotalTestCases + 1
  1561. if hDlg <> 0 then
  1562. teststring.Apprase = "Pass"
  1563. else
  1564. teststring.Apprase = "FAIL *"
  1565. FailedTestCases = FailedTestCases + 1
  1566. endif
  1567. LogCase (teststring)
  1568. '--- Steps 5 through 7
  1569. sleep .1 'param checkbox will not change if covered by the call
  1570. 'status box. The delay allows the dialog to disappear
  1571. ParamSet = SetParamState (hTB20, UNCHECKED)
  1572. rtn = Call_LDrop ( (hTB20), (hTB_Ctrl), ParamSet,ReceiveState )
  1573. rtn = Call_lDeallocateCall ((hTB20), (hTB_Ctrl), ParamSet )
  1574. rtn = Call_LClose ((hTB20), (hTB_Ctrl), ParamSet )
  1575. rtn = Call_LShutDown ((hTB20), (hTB_Ctrl), ParamSet )
  1576. WSetActWnd (hTB20)
  1577. WMenuSelect (MFILE + "\" + MEXIT, TIMEOUT)
  1578. '******************************************************************************
  1579. ' TC - 81 lineGetID - comm & comm/datamodem *
  1580. '******************************************************************************
  1581. 'Note: This test case is dependent on TC 31 returning a valid modem name
  1582. ' The test cannot run without it
  1583. '--- Step 1 through 2
  1584. StartTAPIBrowser(hTB20, hTB_Ctrl, hTB_CtrlID)
  1585. WritelogItem (" " , "")
  1586. WritelogItem ("Test Case 81" , "")
  1587. TC_ID = 81
  1588. TotalScenarios = TotalScenarios + 1
  1589. ParamSet = SetParamState (hTB20, UNCHECKED)
  1590. rtn = Call_LInitialize ( (hTB20), (hTB_Ctrl), Paramset, hLineApp, Num_Dev )
  1591. if rtn > 0 then
  1592. WritelogItem ("Step 5 - lineInitialize failed error = " , ltrim$(hex$(rtn)))
  1593. WritelogItem ("" , "This Test Will Terminate")
  1594. end
  1595. endif
  1596. ParamSet = SetParamState (hTB20, CHECKED)
  1597. redim (ParamTraits) (0) as ParamAttributes
  1598. ParamTraits(0).Param = "dwPrivileges"
  1599. ParamTraits(0).BitFlagList = "OWNER"
  1600. ParamTraits(0).ValueEdit = ""
  1601. ParamTraits(0).ValueList = ""
  1602. rtn = Call_LOpen ( (hTB20), (hTB_Ctrl), ParamSet, lOpenRtn )
  1603. if rtn > 0 then
  1604. WritelogItem ("Step 6 - lineOpen failed error = " , ltrim$(hex$(rtn)))
  1605. WritelogItem ("" , "This Test Will Terminate")
  1606. end
  1607. endif
  1608. ParamTraits(0).Param = "lpszDeviceClass"
  1609. ParamTraits(0).BitFlagList = ""
  1610. ParamTraits(0).ValueEdit = "comm"
  1611. ParamTraits(0).ValueList = ""
  1612. rtn = Call_LGetID ( (hTB20), (hTB_Ctrl), Paramset, Returnstr )
  1613. '--- Results 1
  1614. teststring.TC_Num = 1
  1615. teststring.Expect_Res = "SUCCESS"
  1616. teststring.Actual_Res = LineReturnString ( rtn )
  1617. TotalTestCases = TotalTestCases + 1
  1618. if rtn = 0 then
  1619. teststring.Apprase = "Pass"
  1620. else
  1621. teststring.Apprase = "FAIL *"
  1622. FailedTestCases = FailedTestCases + 1
  1623. endif
  1624. LogCase (teststring)
  1625. '--- Results 1
  1626. teststring.TC_Num = 2
  1627. teststring.Expect_Res = "dwStringFormat = ASCII"
  1628. rtn = instr(1, Returnstr, "dwStringFormat")
  1629. CRLFrtn = instr(rtn, Returnstr, CRLF)
  1630. rtn = instr(rtn, Returnstr, ",")
  1631. tempstr = ltrim$(mid$(Returnstr , rtn + 1, CRLFrtn - (rtn + 1)))
  1632. teststring.Actual_Res = tempstr
  1633. TotalTestCases = TotalTestCases + 1
  1634. if tempstr = "ASCII" then
  1635. teststring.Apprase = "Pass"
  1636. else
  1637. teststring.Apprase = "FAIL *"
  1638. FailedTestCases = FailedTestCases + 1
  1639. endif
  1640. LogCase (teststring)
  1641. '--- Results 1
  1642. teststring.TC_Num = 3
  1643. teststring.Expect_Res = ModemName ' Returned in TC 31
  1644. teststring.Actual_Res = GetModemName ( Returnstr, strhObject)
  1645. TotalTestCases = TotalTestCases + 1
  1646. if teststring.Actual_Res = ModemName then
  1647. teststring.Apprase = "Pass"
  1648. else
  1649. teststring.Apprase = "FAIL *"
  1650. FailedTestCases = FailedTestCases + 1
  1651. endif
  1652. LogCase (teststring)
  1653. '*************************************************************************************
  1654. ParamTraits(0).Param = "lpszDeviceClass"
  1655. ParamTraits(0).BitFlagList = ""
  1656. ParamTraits(0).ValueEdit = "ndis"
  1657. ParamTraits(0).ValueList = ""
  1658. rtn = Call_LGetID ( (hTB20), (hTB_Ctrl), Paramset, Returnstr )
  1659. '--- Results 2
  1660. teststring.TC_Num = teststring.TC_Num + 1
  1661. teststring.Expect_Res = "SUCCESS"
  1662. teststring.Actual_Res = LineReturnString ( rtn )
  1663. TotalTestCases = TotalTestCases + 1
  1664. if rtn = 0 then
  1665. teststring.Apprase = "Pass"
  1666. else
  1667. teststring.Apprase = "FAIL *"
  1668. FailedTestCases = FailedTestCases + 1
  1669. endif
  1670. LogCase (teststring)
  1671. '--- Results 2
  1672. teststring.TC_Num = teststring.TC_Num + 1
  1673. teststring.Expect_Res = "dwStringFormat = BINARY"
  1674. rtn = instr(1, Returnstr, "dwStringFormat")
  1675. CRLFrtn = instr(rtn, Returnstr, CRLF)
  1676. rtn = instr(rtn, Returnstr, ",")
  1677. tempstr = ltrim$(mid$(Returnstr , rtn + 1, CRLFrtn - (rtn + 1)))
  1678. teststring.Actual_Res = tempstr
  1679. TotalTestCases = TotalTestCases + 1
  1680. if tempstr = "BINARY" then
  1681. teststring.Apprase = "Pass"
  1682. else
  1683. teststring.Apprase = "FAIL *"
  1684. FailedTestCases = FailedTestCases + 1
  1685. endif
  1686. LogCase (teststring)
  1687. '*************************************************************************************
  1688. '--- Test 3
  1689. ParamTraits(0).Param = "lpszDeviceClass"
  1690. ParamTraits(0).BitFlagList = ""
  1691. ParamTraits(0).ValueEdit = "comm/datamodem"
  1692. ParamTraits(0).ValueList = ""
  1693. rtn = Call_LGetID ( (hTB20), (hTB_Ctrl), Paramset, Returnstr )
  1694. '--- Results 3
  1695. teststring.TC_Num = teststring.TC_Num + 1
  1696. teststring.Expect_Res = "SUCCESS"
  1697. teststring.Actual_Res = LineReturnString ( rtn )
  1698. TotalTestCases = TotalTestCases + 1
  1699. if rtn = 0 then
  1700. teststring.Apprase = "Pass"
  1701. else
  1702. teststring.Apprase = "FAIL *"
  1703. FailedTestCases = FailedTestCases + 1
  1704. endif
  1705. LogCase (teststring)
  1706. '--- Results 3
  1707. teststring.TC_Num = teststring.TC_Num + 1
  1708. teststring.Expect_Res = "dwStringFormat = BINARY"
  1709. rtn = instr(1, Returnstr, "dwStringFormat")
  1710. CRLFrtn = instr(rtn, Returnstr, CRLF)
  1711. rtn = instr(rtn, Returnstr, ",")
  1712. tempstr = ltrim$(mid$(Returnstr , rtn + 1, CRLfrtn - (rtn + 1)))
  1713. teststring.Actual_Res = tempstr
  1714. TotalTestCases = TotalTestCases + 1
  1715. if tempstr = "BINARY" then
  1716. teststring.Apprase = "Pass"
  1717. else
  1718. teststring.Apprase = "FAIL *"
  1719. FailedTestCases = FailedTestCases + 1
  1720. endif
  1721. LogCase (teststring)
  1722. teststring.TC_Num = teststring.TC_Num + 1
  1723. teststring.Expect_Res = ModemName ' Returned in TC 31
  1724. teststring.Actual_Res = GetModemName ( Returnstr, strhObject)
  1725. teststring.Actual_Res = right$(teststring.Actual_Res, len(teststring.Actual_Res) -4)
  1726. TotalTestCases = TotalTestCases + 1
  1727. if teststring.Actual_Res = ModemName then
  1728. teststring.Apprase = "Pass"
  1729. else
  1730. teststring.Apprase = "FAIL *"
  1731. FailedTestCases = FailedTestCases + 1
  1732. endif
  1733. LogCase (teststring)
  1734. '--- Step 5
  1735. 'Delete leading zeros from strhObject
  1736. strhObject = ltrim$(Hex$(Val("&h"+ strhObject)))
  1737. ParamTraits(0).Param = "hObject"
  1738. ParamTraits(0).BitFlagList = ""
  1739. ParamTraits(0).ValueEdit = strhObject
  1740. ParamTraits(0).ValueList = ""
  1741. rtn = TCloseHandle ((hTB20), (hTB_Ctrl), ParamSet, returnstr)
  1742. teststring.TC_Num = teststring.TC_Num + 1
  1743. teststring.Expect_Res = "Handle " + strhObject + " Closed"
  1744. CRLFrtn = instr(1, returnstr, CRLF)
  1745. if CRLFrtn = 0 then
  1746. teststring.Actual_Res = returnstr
  1747. else
  1748. teststring.Actual_Res = left$(returnstr, len(returnstr) - (len(returnstr) - CRLFrtn - 1))
  1749. endif
  1750. TotalTestCases = TotalTestCases + 1
  1751. if rtn = True then
  1752. teststring.Apprase = "Pass"
  1753. else
  1754. teststring.Apprase = "FAIL *"
  1755. FailedTestCases = FailedTestCases + 1
  1756. endif
  1757. LogCase (teststring)
  1758. '--- Steps 6, 7
  1759. ParamSet = SetParamState (hTB20, UNCHECKED)
  1760. rtn = Call_LClose ((hTB20), (hTB_Ctrl), ParamSet )
  1761. rtn = Call_LShutDown ((hTB20), (hTB_Ctrl), ParamSet )
  1762. WSetActWnd (hTB20)
  1763. WMenuSelect (MFILE + "\" + MEXIT, TIMEOUT)
  1764. '******************************************************************************
  1765. ' TC - 83 lineReply & lineCallState *
  1766. '******************************************************************************
  1767. '--- Step 1
  1768. StartTAPIBrowser(hTB20, hTB_Ctrl, hTB_CtrlID)
  1769. WritelogItem (" " , "")
  1770. WritelogItem ("Test Case 83" , "")
  1771. TC_ID = 83
  1772. TotalScenarios = TotalScenarios + 1
  1773. ParamSet = SetParamState (hTB20, UNCHECKED)
  1774. '--- Steps 2 through 4
  1775. rtn = Call_LInitialize ( (hTB20), (hTB_Ctrl), Paramset, hLineApp, Num_Dev )
  1776. if rtn > 0 then
  1777. WritelogItem ("Step 5 - lineInitialize failed error = " , ltrim$(hex$(rtn)))
  1778. WritelogItem ("" , "This Test Will Terminate")
  1779. end
  1780. endif
  1781. rtn = Call_LInitialize ( (hTB20), (hTB_Ctrl), Paramset, hLineApp, Num_Dev )
  1782. if rtn > 0 then
  1783. WritelogItem ("Step 5 - lineInitialize failed error = " , ltrim$(hex$(rtn)))
  1784. WritelogItem ("" , "This Test Will Terminate")
  1785. end
  1786. endif
  1787. rtn = Call_LShutDown ((hTB20), (hTB_Ctrl), ParamSet )
  1788. '--- Steps 5 and 6
  1789. rtn = Call_LOpen ( (hTB20), (hTB_Ctrl), ParamSet, lOpenRtn )
  1790. if rtn > 0 then
  1791. WritelogItem ("Step 6 - lineOpen failed error = " , ltrim$(hex$(rtn)))
  1792. WritelogItem ("" , "This Test Will Terminate")
  1793. end
  1794. endif
  1795. ReceiveState.Msg = ""
  1796. ReceiveState.device = ""
  1797. ReceiveState.cbInst = ""
  1798. ReceiveState.param1 = ""
  1799. ReceiveState.param2 = ""
  1800. ReceiveState.param3 = ""
  1801. ReceiveState.ErrorStr = ""
  1802. rtn = Call_LMakeCall ( (hTB20), (hTB_Ctrl), ParamSet, ReceiveState, Returnstr )
  1803. '--- Results 1
  1804. teststring.TC_Num = 1
  1805. teststring.Expect_Res = "LINE_REPLY or LINE_CALLSTATE"
  1806. TotalTestCases = TotalTestCases + 1
  1807. rtn = 0
  1808. rtn = instr (1, returnstr, "LINE_REPLY")
  1809. if rtn > 0 then
  1810. teststring.Actual_Res = "LINE_REPLY"
  1811. teststring.Apprase = "Pass"
  1812. else
  1813. rtn = instr (1, returnstr, "LINE_CALLSTATE")
  1814. if rtn > 0 then
  1815. teststring.Actual_Res = "LINE_CALLSTATE"
  1816. teststring.Apprase = "Pass"
  1817. else
  1818. teststring.Actual_Res = ""
  1819. teststring.Apprase = "FAIL *"
  1820. FailedTestCases = FailedTestCases + 1
  1821. endif
  1822. endif
  1823. LogCase (teststring)
  1824. '--- Steps 7 through 10
  1825. rtn = Call_LDrop ( (hTB20), (hTB_Ctrl), ParamSet,ReceiveState )
  1826. rtn = Call_lDeallocateCall ((hTB20), (hTB_Ctrl), ParamSet )
  1827. rtn = Call_LClose ((hTB20), (hTB_Ctrl), ParamSet )
  1828. rtn = Call_LShutDown ((hTB20), (hTB_Ctrl), ParamSet )
  1829. WSetActWnd (hTB20)
  1830. WMenuSelect (MFILE + "\" + MEXIT, TIMEOUT)
  1831. '******************************************************************************
  1832. ' TC - 175 lineNegotiateAPIVersion / 2.0 *
  1833. '******************************************************************************
  1834. '--- Step 1 through 5
  1835. StartTAPIBrowser(hTB20, hTB_Ctrl, hTB_CtrlID)
  1836. WritelogItem (" " , "")
  1837. WritelogItem ("Test Case 175" , "")
  1838. TC_ID = 175
  1839. TotalScenarios = TotalScenarios + 1
  1840. ParamSet = SetParamState (hTB20, UNCHECKED)
  1841. rtn = Call_LInitializeEx ( (hTB20), (hTB_Ctrl), Paramset, hLineApp, Num_Dev, returnstr )
  1842. if rtn > 0 then
  1843. WritelogItem ("lineInitializeEx failed error = " , ltrim$(hex$(rtn)))
  1844. WritelogItem ("" , "This Test Will Terminate")
  1845. end
  1846. endif
  1847. if Num_Dev = 0 then
  1848. WritelogItem ("lineInitializeEx returned 0 devices = " , ltrim$(hex$(rtn)))
  1849. WritelogItem ("" , "This Test Will Terminate")
  1850. end
  1851. endif
  1852. rtn = Call_LNegotiateAPIVer ( (hTB20), (hTB_Ctrl), ParamSet, lNegVerRtn )
  1853. '--- Results 1
  1854. teststring.TC_Num = 1
  1855. teststring.Expect_Res = "LineNegotiateAPIVersion Rtn SUCCESS"
  1856. teststring.Actual_Res = LineReturnString (rtn)
  1857. TotalTestCases = TotalTestCases + 1
  1858. if teststring.Actual_Res = "SUCCESS" then
  1859. teststring.Apprase = "Pass"
  1860. else
  1861. teststring.Apprase = "FAIL *"
  1862. FailedTestCases = FailedTestCases + 1
  1863. endif
  1864. LogCase (teststring)
  1865. '--- API Version Results
  1866. teststring.Expect_Res = "x20000"
  1867. teststring.Actual_Res = lNegVerRtn.API_Ver
  1868. TotalTestCases = TotalTestCases + 1
  1869. if teststring.Actual_Res = teststring.Expect_Res then
  1870. teststring.Apprase = "Pass"
  1871. else
  1872. teststring.Apprase = "FAIL *"
  1873. FailedTestCases = FailedTestCases + 1
  1874. endif
  1875. LogCase (teststring)
  1876. teststring.Expect_Res = "ID's = x0"
  1877. TotalTestCases = TotalTestCases + 1
  1878. rtn = 0
  1879. for count = 0 to 3
  1880. if lNegVerRtn.ID(count) <> "x0" then
  1881. rtn = rtn + 1 'rtn is used as a fail counter
  1882. end if
  1883. next
  1884. if rtn = 0 then
  1885. teststring.Actual_Res = "ID's = x0"
  1886. teststring.Apprase = "Pass"
  1887. else
  1888. teststring.Actual_Res = "ID's <> x0"
  1889. teststring.Apprase = "FAIL *"
  1890. FailedTestCases = FailedTestCases + 1
  1891. endif
  1892. LogCase (teststring)
  1893. ParamSet = SetParamState (hTB20, CHECKED)
  1894. '--- Steps 6 through 9
  1895. ParamTraits(0).Param = "dwAPILowVersion"
  1896. ParamTraits(0).BitFlagList = ""
  1897. ParamTraits(0).ValueEdit = "00030000"
  1898. ParamTraits(0).ValueList = ""
  1899. rtn = Call_LNegotiateAPIVer ( (hTB20), (hTB_Ctrl), ParamSet, lNegVerRtn )
  1900. '--- Results 2
  1901. teststring.TC_Num = 2
  1902. teststring.Expect_Res = "INCOMPATIBLEAPIVERSION"
  1903. teststring.Actual_Res = LineReturnString (rtn)
  1904. TotalTestCases = TotalTestCases + 1
  1905. if teststring.Actual_Res = LineReturnString (LINEERR_INCOMPATIBLEAPIVERSION) then
  1906. teststring.Apprase = "Pass"
  1907. else
  1908. teststring.Apprase = "FAIL *"
  1909. FailedTestCases = FailedTestCases + 1
  1910. endif
  1911. LogCase (teststring)
  1912. '--- Steps 11 through 14
  1913. ParamTraits(0).Param = "dwAPILowVersion"
  1914. ParamTraits(0).BitFlagList = ""
  1915. ParamTraits(0).ValueEdit = "00010003"
  1916. ParamTraits(0).ValueList = ""
  1917. rtn = Call_LNegotiateAPIVer ( (hTB20), (hTB_Ctrl), ParamSet, lNegVerRtn )
  1918. '--- Results 3
  1919. teststring.TC_Num = 3
  1920. teststring.Expect_Res = "LineNegotiateAPIVersion Rtn SUCCESS"
  1921. teststring.Actual_Res = LineReturnString (rtn)
  1922. TotalTestCases = TotalTestCases + 1
  1923. if teststring.Actual_Res = "SUCCESS" then
  1924. teststring.Apprase = "Pass"
  1925. else
  1926. teststring.Apprase = "FAIL *"
  1927. FailedTestCases = FailedTestCases + 1
  1928. endif
  1929. LogCase (teststring)
  1930. '--- API Version Results
  1931. teststring.Expect_Res = "x20000"
  1932. teststring.Actual_Res = lNegVerRtn.API_Ver
  1933. TotalTestCases = TotalTestCases + 1
  1934. if teststring.Actual_Res = teststring.Expect_Res then
  1935. teststring.Apprase = "Pass"
  1936. else
  1937. teststring.Apprase = "FAIL *"
  1938. FailedTestCases = FailedTestCases + 1
  1939. endif
  1940. LogCase (teststring)
  1941. teststring.Expect_Res = "ID's = x0"
  1942. TotalTestCases = TotalTestCases + 1
  1943. rtn = 0
  1944. for count = 0 to 3
  1945. if lNegVerRtn.ID(count) <> "x0" then
  1946. rtn = rtn + 1 'rtn is used as a fail counter
  1947. end if
  1948. next
  1949. if rtn = 0 then
  1950. teststring.Actual_Res = "ID's = x0"
  1951. teststring.Apprase = "Pass"
  1952. else
  1953. teststring.Actual_Res = "ID's <> x0"
  1954. teststring.Apprase = "FAIL *"
  1955. FailedTestCases = FailedTestCases + 1
  1956. endif
  1957. LogCase (teststring)
  1958. ParamTraits(0).Param = ""
  1959. ParamTraits(0).BitFlagList = ""
  1960. ParamTraits(0).ValueEdit = ""
  1961. ParamTraits(0).ValueList = ""
  1962. rtn = Call_LShutDown ((hTB20), (hTB_Ctrl), ParamSet )
  1963. ParamSet = SetParamState (hTB20, UNCHECKED)
  1964. ' Close TAPI Browser - ALL LINES MUST BE SHUTDOWN BY NOW
  1965. WSetActWnd (hTB20)
  1966. WMenuSelect (MFILE + "\" + MEXIT, TIMEOUT)
  1967. '******************************************************************************
  1968. ' TC - 176 lineGetMessage *
  1969. '******************************************************************************
  1970. '--- Step 1 through 10
  1971. StartTAPIBrowser(hTB20, hTB_Ctrl, hTB_CtrlID)
  1972. WritelogItem (" " , "")
  1973. WritelogItem ("Test Case 176" , "")
  1974. TC_ID = 176
  1975. TotalScenarios = TotalScenarios + 1
  1976. ParamSet = SetParamState (hTB20, CHECKED)
  1977. ParamTraits(0).Param = " ->dwOptions"
  1978. ParamTraits(0).BitFlagList = "USEEVENT"
  1979. ParamTraits(0).ValueEdit = ""
  1980. ParamTraits(0).ValueList = ""
  1981. rtn = Call_LInitializeEx ( (hTB20), (hTB_Ctrl), Paramset, hLineApp, Num_Dev, Returnstr )
  1982. if rtn > 0 then
  1983. WritelogItem ("lineInitialize failed error = " , ltrim$(hex$(rtn)))
  1984. WritelogItem ("" , "This Test Will Terminate")
  1985. end
  1986. endif
  1987. ParamTraits(0).Param = ""
  1988. ParamTraits(0).BitFlagList = ""
  1989. ParamTraits(0).ValueEdit = ""
  1990. ParamTraits(0).ValueList = ""
  1991. rtn = Call_LOpen ( (hTB20), (hTB_Ctrl), ParamSet, lOpenRtn )
  1992. if rtn > 0 then
  1993. WritelogItem ("lineOpen failed error = " , ltrim$(hex$(rtn)))
  1994. WritelogItem ("" , "This Test Will Terminate")
  1995. end
  1996. endif
  1997. ParamTraits(0).Param = ""
  1998. ParamTraits(0).BitFlagList = ""
  1999. ParamTraits(0).ValueEdit = ""
  2000. ParamTraits(0).ValueList = ""
  2001. ReceiveState.Msg = ""
  2002. ReceiveState.device = ""
  2003. ReceiveState.cbInst = ""
  2004. ReceiveState.param1 = ""
  2005. ReceiveState.param2 = ""
  2006. ReceiveState.param3 = ""
  2007. ReceiveState.ErrorStr = ""
  2008. rtn = Call_LMakeCall ( (hTB20), (hTB_Ctrl), ParamSet, ReceiveState, Returnstr )
  2009. '--- Results 1
  2010. teststring.TC_Num = 1
  2011. teststring.Expect_Res = "MakeCall Request ID"
  2012. TotalTestCases = TotalTestCases + 1
  2013. rtn = instr(1, returnstr, "x")
  2014. if rtn > 0 then
  2015. CRLFrtn = instr(rtn, returnstr, CRLF)
  2016. if CRLFrtn > rtn then
  2017. teststring.Actual_Res = mid$ (returnstr , rtn + 1, CRLFrtn - (rtn+1))
  2018. else
  2019. teststring.Actual_Res = "0"
  2020. endif
  2021. else
  2022. teststring.Actual_Res = "0"
  2023. endif
  2024. if Val(teststring.Actual_Res) > 0 then
  2025. teststring.Apprase = "Pass"
  2026. else
  2027. teststring.Apprase = "FAIL *"
  2028. FailedTestCases = FailedTestCases + 1
  2029. endif
  2030. LogCase (teststring)
  2031. '--- Steps 11 through 12
  2032. ParamTraits(0).Param = ""
  2033. ParamTraits(0).BitFlagList = ""
  2034. ParamTraits(0).ValueEdit = ""
  2035. ParamTraits(0).ValueList = ""
  2036. rtn = Call_LGetMessage ((hTB20), (hTB_Ctrl), ParamSet, returnstr)
  2037. '--- Results 2
  2038. teststring.TC_Num = 2
  2039. teststring.Expect_Res = "LineGetMessage Rtn SUCCESS"
  2040. teststring.Actual_Res = LineReturnString (rtn)
  2041. TotalTestCases = TotalTestCases + 1
  2042. if teststring.Actual_Res = "SUCCESS" then
  2043. teststring.Apprase = "Pass"
  2044. else
  2045. teststring.Apprase = "FAIL *"
  2046. FailedTestCases = FailedTestCases + 1
  2047. endif
  2048. LogCase (teststring)
  2049. '--- Results 3
  2050. teststring.TC_Num = 3
  2051. teststring.Expect_Res = "LINE_REPLY"
  2052. TotalTestCases = TotalTestCases + 1
  2053. 'Look for 2nd CRLF in returnstr
  2054. teststring.Actual_Res = "No Message"
  2055. rtn = instr(1, returnstr, CRLF)
  2056. CRLFrtn = instr(rtn+1, returnstr, CRLF)
  2057. if CRLFrtn > 0 then
  2058. rtn = instr(rtn, returnstr, "received")
  2059. if rtn > 0 then
  2060. teststring.Actual_Res = ltrim$(rtrim$(mid$(returnstr, rtn + 9, CRLFrtn - (rtn + 9))))
  2061. endif
  2062. endif
  2063. if teststring.Actual_Res = teststring.Expect_Res then
  2064. teststring.Apprase = "Pass"
  2065. else
  2066. teststring.Apprase = "FAIL *"
  2067. FailedTestCases = FailedTestCases + 1
  2068. endif
  2069. LogCase (teststring)
  2070. '--- Steps 13 through 18
  2071. ParamSet = SetParamState (hTB20, UNCHECKED)
  2072. rtn = Call_LDrop ( (hTB20), (hTB_Ctrl), ParamSet,ReceiveState )
  2073. rtn = Call_lDeallocateCall ((hTB20), (hTB_Ctrl), ParamSet )
  2074. rtn = Call_LClose ((hTB20), (hTB_Ctrl), ParamSet )
  2075. rtn = Call_LShutDown ((hTB20), (hTB_Ctrl), ParamSet )
  2076. ' Close TAPI Browser - ALL LINES MUST BE SHUTDOWN BY NOW
  2077. WSetActWnd (hTB20)
  2078. WMenuSelect (MFILE + "\" + MEXIT, TIMEOUT)
  2079. '******************************************************************************
  2080. ' TC - 177 lineGetStatusMessage *
  2081. '******************************************************************************
  2082. '--- Step 1 through 4
  2083. StartTAPIBrowser(hTB20, hTB_Ctrl, hTB_CtrlID)
  2084. WritelogItem (" " , "")
  2085. WritelogItem ("Test Case 177" , "")
  2086. TC_ID = 177
  2087. TotalScenarios = TotalScenarios + 1
  2088. ParamSet = SetParamState (hTB20, UNCHECKED)
  2089. rtn = Call_LInitialize ( (hTB20), (hTB_Ctrl), Paramset, hLineApp, Num_Dev )
  2090. if rtn > 0 then
  2091. WritelogItem ("lineInitialize failed error = " , ltrim$(hex$(rtn)))
  2092. WritelogItem ("" , "This Test Will Terminate")
  2093. end
  2094. endif
  2095. rtn = Call_LOpen ( (hTB20), (hTB_Ctrl), ParamSet, lOpenRtn )
  2096. if rtn > 0 then
  2097. WritelogItem ("lineOpen failed error = " , ltrim$(hex$(rtn)))
  2098. WritelogItem ("" , "This Test Will Terminate")
  2099. end
  2100. endif
  2101. rtn = Call_LGetStatusMessages ((hTB20), (hTB_Ctrl), ParamSet )
  2102. teststring.TC_Num = 1
  2103. teststring.Expect_Res = "GetStatusMessage Rtn SUCCESS"
  2104. teststring.Actual_Res = LineReturnString (rtn)
  2105. TotalTestCases = TotalTestCases + 1
  2106. if teststring.Actual_Res = "SUCCESS" then
  2107. teststring.Apprase = "Pass"
  2108. else
  2109. teststring.Apprase = "FAIL *"
  2110. FailedTestCases = FailedTestCases + 1
  2111. endif
  2112. LogCase (teststring)
  2113. '--- Steps 5 through 7
  2114. rtn = Call_LClose ((hTB20), (hTB_Ctrl), ParamSet )
  2115. rtn = Call_LShutDown ((hTB20), (hTB_Ctrl), ParamSet )
  2116. ' Close TAPI Browser - ALL LINES MUST BE SHUTDOWN BY NOW
  2117. WSetActWnd (hTB20)
  2118. WMenuSelect (MFILE + "\" + MEXIT, TIMEOUT)
  2119. '******************************************************************************
  2120. ' TC - 178 lineGetNumRings & lineSetNumRings *
  2121. '******************************************************************************
  2122. '--- Step 1 through 4
  2123. StartTAPIBrowser(hTB20, hTB_Ctrl, hTB_CtrlID)
  2124. WritelogItem (" " , "")
  2125. WritelogItem ("Test Case 178" , "")
  2126. TC_ID = 178
  2127. TotalScenarios = TotalScenarios + 1
  2128. ParamSet = SetParamState (hTB20, UNCHECKED)
  2129. rtn = Call_LInitialize ( (hTB20), (hTB_Ctrl), Paramset, hLineApp, Num_Dev )
  2130. if rtn > 0 then
  2131. WritelogItem ("lineInitialize failed error = " , ltrim$(hex$(rtn)))
  2132. WritelogItem ("" , "This Test Will Terminate")
  2133. end
  2134. endif
  2135. rtn = Call_LOpen ( (hTB20), (hTB_Ctrl), ParamSet, lOpenRtn )
  2136. if rtn > 0 then
  2137. WritelogItem ("lineOpen failed error = " , ltrim$(hex$(rtn)))
  2138. WritelogItem ("" , "This Test Will Terminate")
  2139. end
  2140. endif
  2141. rtn = Call_LGetNumRings ( (hTB20), (hTB_Ctrl), Paramset, NumRings )
  2142. '--- Results 1 and 2
  2143. teststring.TC_Num = 1
  2144. teststring.Expect_Res = "GetNumRings Rtn SUCCESS"
  2145. teststring.Actual_Res = LineReturnString (rtn)
  2146. TotalTestCases = TotalTestCases + 1
  2147. if teststring.Actual_Res = "SUCCESS" then
  2148. teststring.Apprase = "Pass"
  2149. else
  2150. teststring.Apprase = "FAIL *"
  2151. FailedTestCases = FailedTestCases + 1
  2152. endif
  2153. LogCase (teststring)
  2154. teststring.TC_Num = 2
  2155. teststring.Expect_Res = "Num Rings = ffffffff"
  2156. teststring.Actual_Res = NumRings
  2157. TotalTestCases = TotalTestCases + 1
  2158. if teststring.Actual_Res = "ffffffff" then
  2159. teststring.Apprase = "Pass"
  2160. else
  2161. teststring.Apprase = "FAIL *"
  2162. FailedTestCases = FailedTestCases + 1
  2163. endif
  2164. LogCase (teststring)
  2165. '--- Steps 5 through 9
  2166. ParamSet = SetParamState (hTB20, CHECKED)
  2167. ParamTraits(0).Param = "dwNumRings"
  2168. ParamTraits(0).BitFlagList = ""
  2169. ParamTraits(0).ValueEdit = SET_RINGS
  2170. ParamTraits(0).ValueList = ""
  2171. rtn = Call_LSetNumRings ( (hTB20), (hTB_Ctrl), Paramset )
  2172. '--- Results 3
  2173. teststring.TC_Num = 3
  2174. teststring.Expect_Res = "SetNumRings Rtn SUCCESS"
  2175. teststring.Actual_Res = LineReturnString (rtn)
  2176. TotalTestCases = TotalTestCases + 1
  2177. if teststring.Actual_Res = "SUCCESS" then
  2178. teststring.Apprase = "Pass"
  2179. else
  2180. teststring.Apprase = "FAIL *"
  2181. FailedTestCases = FailedTestCases + 1
  2182. endif
  2183. LogCase (teststring)
  2184. '--- Steps 10 through 11
  2185. ParamSet = SetParamState (hTB20, UNCHECKED)
  2186. rtn = Call_LGetNumRings ( (hTB20), (hTB_Ctrl), Paramset, NumRings )
  2187. '--- Results 4 and 5
  2188. teststring.TC_Num = 4
  2189. teststring.Expect_Res = "GetNumRings Rtn SUCCESS"
  2190. teststring.Actual_Res = LineReturnString (rtn)
  2191. TotalTestCases = TotalTestCases + 1
  2192. if teststring.Actual_Res = "SUCCESS" then
  2193. teststring.Apprase = "Pass"
  2194. else
  2195. teststring.Apprase = "FAIL *"
  2196. FailedTestCases = FailedTestCases + 1
  2197. endif
  2198. LogCase (teststring)
  2199. teststring.TC_Num = 5
  2200. teststring.Expect_Res = "Num Rings = " + SET_RINGS
  2201. teststring.Actual_Res = NumRings
  2202. TotalTestCases = TotalTestCases + 1
  2203. if teststring.Actual_Res = SET_RINGS then
  2204. teststring.Apprase = "Pass"
  2205. else
  2206. teststring.Apprase = "FAIL *"
  2207. FailedTestCases = FailedTestCases + 1
  2208. endif
  2209. LogCase (teststring)
  2210. '--- Steps 12 through 14
  2211. rtn = Call_LClose ((hTB20), (hTB_Ctrl), ParamSet )
  2212. rtn = Call_LShutDown ((hTB20), (hTB_Ctrl), ParamSet )
  2213. ' Close TAPI Browser - ALL LINES MUST BE SHUTDOWN BY NOW
  2214. WSetActWnd (hTB20)
  2215. WMenuSelect (MFILE + "\" + MEXIT, TIMEOUT)
  2216. '$ifdef NotyetValidated
  2217. '$endif 'NotyetValidated
  2218. '******************************************************************************
  2219. '*** END OF TEST *
  2220. '******************************************************************************
  2221. END 'TAPI_BVT Test
  2222. '****************************** On Error Routine ******************************
  2223. ErrorHandler:
  2224. ErrorMessage = "Unexpected error in the TAPI Build Verification Test: " + CRLF + CRLF + _
  2225. "Error: " + error$ + CRLF + _
  2226. "Error #:" + str$(Err) + CRLF + _
  2227. "Line #: " + str$(Erl) + CRLF + _
  2228. "File: " + Erf + CRLF + CRLF + _
  2229. "Attempt to continue?"
  2230. '$IFDEF DEBUG_TEST_SCRIPT
  2231. if Msgbox(ErrorMessage, MB_ICONEXCLAMATION or MB_YESNO) = IDYES then
  2232. resume next
  2233. else
  2234. Stop
  2235. endif
  2236. '$ELSE
  2237. Statusbox "Run Time error detected, Test will terminate", _
  2238. 0,0,0,0, TRUE, TRUE
  2239. Sleep 4
  2240. WritelogItem ("" , ErrorMessage)
  2241. Stop
  2242. '$ENDIF 'DEBUG_TEST_SCRIPT
  2243. '******************************************************************************