Ignore:
Timestamp:
Jun 26, 2012, 8:01:30 PM (12 years ago)
Author:
Sam Habiel
Message:

Refactoring cont.
Many changes in BSDX08. Extensive changes in BSDX31. Creation of BSDXAPI1 as continuation of BSDXAPI.
BSDXUT1 now has UTs for BSDX31. Transactions now gone from BSDX08 and BSDX31.
BSDX08 needs more tests at failure points. BSDX31 still needs analysis for transaction failure and
code for rollback points, plus tests for that.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Scheduling/trunk/m/BSDXUT.m

    r1455 r1461  
    1 BSDXUT ; VEN/SMH - Unit Tests for Scheduling GUI ; 6/22/12 4:27pm
     1BSDXUT ; VEN/SMH - Unit Tests for Scheduling GUI ; 6/26/12 11:06am
    22        ;;1.7T1;BSDX;;Aug 31, 2011;Build 18
    33        ; Licensed under LGPL
     
    276276        ;
    277277        ; Test 3: Check for -100
    278         N BSDXDIE S BSDXDIE=1
    279         D APPADD^BSDX07(.ZZZ,APPTTIME,ENDTIME,DFN,RESNAM,30,"Sam's Note",1)
    280         S APPID=+$P(^BSDXTMP($J,1),U)
     278        N TIMES S TIMES=$$TIMES^BSDXUT ; appt time^end time
     279        N APPTTIME S APPTTIME=$P(TIMES,U)
     280        N ENDTIME S ENDTIME=$P(TIMES,U,2)
     281        D APPADD^BSDX07(.ZZZ,APPTTIME,ENDTIME,DFN,RESNAM,30,"Sam's Note",1)
     282        S APPID=+$P(^BSDXTMP($J,1),U)
     283        N BSDXDIE1 S BSDXDIE1=1
    281284        D APPDEL^BSDX08(.ZZZ,APPID,"PC",1,"Reasons")
    282285        I $P(^BSDXTMP($J,1),"~")'=-100 W "Error in -100",!
    283         K BSDXDIE
    284         ;
     286        K BSDXDIE1
     287        ;
     288        ; Test 3.5: Check for -100 with an appointment to rollback.
     289        N TIMES S TIMES=$$TIMES^BSDXUT ; appt time^end time
     290        N APPTTIME S APPTTIME=$P(TIMES,U)
     291        N ENDTIME S ENDTIME=$P(TIMES,U,2)
     292        D APPADD^BSDX07(.ZZZ,APPTTIME,ENDTIME,DFN,RESNAM,30,"Sam's Note",1)
     293        S APPID=+$P(^BSDXTMP($J,1),U)
     294        N BSDXDIE2 S BSDXDIE2=1
     295        D APPDEL^BSDX08(.ZZZ,APPID,"PC",1,"Reasons")
     296        I $P(^BSDXTMP($J,1),"~")'=-100 W "Error in -100-1",!
     297        I $P(^BSDXAPPT(APPID,0),U,12)'="" W "Error in -100-2",!
     298        K BSDXDIE2
    285299        ; Test 4: Restartable transaction -- retired in V 1.7
    286300        ; Test 5: for invalid Appointment ID (-2 and -3)
Note: See TracChangeset for help on using the changeset viewer.