diff --git a/resourceschedule/resourceschedule_standard/workscheduler/src/main/js/test/WorkScheduler.test.js b/resourceschedule/resourceschedule_standard/workscheduler/src/main/js/test/WorkScheduler.test.js index d6274b6a5b9d2f9e8d1b144c36d3124eb1aa5dad..1bc5b498552ac221fd02cc537936567a2716a109 100644 --- a/resourceschedule/resourceschedule_standard/workscheduler/src/main/js/test/WorkScheduler.test.js +++ b/resourceschedule/resourceschedule_standard/workscheduler/src/main/js/test/WorkScheduler.test.js @@ -227,10 +227,10 @@ describe("WorkSchedulerJsTest", function () { try { workScheduler.startWork(workInfo); workScheduler.stopWork(workInfo, 111); - } catch ( err) { - console.info("---------------- err: " + err.code); - expect( err.code).assertEqual("401"); + expect(workScheduler.stopWork(workInfo, 111)).assertNull(); done(); + } catch ( err) { + console.info("WorkSchedulerJsTest007 ---------------- err: " + err.code); }; }) diff --git a/resourceschedule/resourceschedule_standard/workscheduler/src/main/js/test/WorkSchedulerMgrJs.test.js b/resourceschedule/resourceschedule_standard/workscheduler/src/main/js/test/WorkSchedulerMgrJs.test.js index 4a04bca2d616a2a781e675a7c641afce3fee3b8c..48eae97e37281efcc9f9d614f7b3f0ad220c68d7 100644 --- a/resourceschedule/resourceschedule_standard/workscheduler/src/main/js/test/WorkSchedulerMgrJs.test.js +++ b/resourceschedule/resourceschedule_standard/workscheduler/src/main/js/test/WorkSchedulerMgrJs.test.js @@ -1297,10 +1297,10 @@ export default function WorkSchedulerMgrApiTest() { try { workScheduler.startWork(workInfo); workScheduler.stopWork(workInfo, "true"); - } catch (error) { - console.info("----------------error: " + error.code); - expect(error.code).assertEqual("401"); + expect(workScheduler.stopWork(workInfo, "true")).assertNull(); done(); + } catch (error) { + console.info("testStopWorkFun001 ----------------error: " + error.code); } }) @@ -1320,11 +1320,11 @@ export default function WorkSchedulerMgrApiTest() { }; try { workScheduler.startWork(workInfo); - workScheduler.stopWork(workInfo, 111); - } catch (error) { - console.info("----------------error: " + error.code); - expect(error.code).assertEqual("401"); + workScheduler.stopWork(workInfo, undefined); + expect(workScheduler.stopWork(workInfo, undefined)).assertNull(); done(); + } catch (error) { + console.info("testStopWorkFun002 ----------------error: " + error.code); }; }) @@ -1345,10 +1345,10 @@ export default function WorkSchedulerMgrApiTest() { try { workScheduler.startWork(workInfo); workScheduler.stopWork(workInfo, null); - } catch (error) { - console.info("----------------error: " + error.code); - expect(error.code).assertEqual("401"); + expect(workScheduler.stopWork(workInfo, null)).assertNull(); done(); + } catch (error) { + console.info("testStopWorkFun003 ----------------error: " + error.code); } }) @@ -1369,10 +1369,10 @@ export default function WorkSchedulerMgrApiTest() { try { workScheduler.startWork(workInfo); workScheduler.stopWork(workInfo); - } catch (error) { - console.info("----------------error: " + error.code); - expect(error.code).assertEqual("401"); + expect(workScheduler.stopWork(workInfo)).assertNull(); done(); + } catch (error) { + console.info("testStopWorkFun004 ----------------error: " + error.code); } })