rooibos-roku 5.15.4 → 5.15.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/framework/source/rooibos/BaseTestSuite.bs +108 -95
- package/dist/lib/framework/source/rooibos/MochaTestReporter.bs +31 -18
- package/dist/lib/framework/source/rooibos/TestResult.bs +2 -1
- package/dist/lib/rooibos/TestGroup.js +7 -2
- package/dist/lib/rooibos/TestGroup.js.map +1 -1
- package/package.json +1 -1
- package/dist/lib/rooibos/CodeCoverageProcessor.spec.js +0 -507
- package/dist/lib/rooibos/CodeCoverageProcessor.spec.js.map +0 -1
- package/dist/lib/rooibos/MockUtil.spec.js +0 -484
- package/dist/lib/rooibos/MockUtil.spec.js.map +0 -1
- package/dist/lib/rooibos/TestSuiteBuilder.spec.js +0 -1160
- package/dist/lib/rooibos/TestSuiteBuilder.spec.js.map +0 -1
|
@@ -230,6 +230,7 @@ namespace rooibos
|
|
|
230
230
|
return invalid
|
|
231
231
|
end if
|
|
232
232
|
|
|
233
|
+
m.currentAssertLineNumber = -1
|
|
233
234
|
m.currentResult.throwOnFailedAssertion = m.throwOnFailedAssertion
|
|
234
235
|
if m.catchCrashes and not test.noCatch and not m.noCatch
|
|
235
236
|
try
|
|
@@ -242,6 +243,9 @@ namespace rooibos
|
|
|
242
243
|
catch error
|
|
243
244
|
'bs:disable-next-line
|
|
244
245
|
m.currentResult.crash("test crashed!", error)
|
|
246
|
+
if rooibos.promises.isPromise(test.deferred)
|
|
247
|
+
rooibos.promises.reject(error, test.deferred)
|
|
248
|
+
end if
|
|
245
249
|
end try
|
|
246
250
|
else
|
|
247
251
|
test.run()
|
|
@@ -268,14 +272,23 @@ namespace rooibos
|
|
|
268
272
|
' * @param {Dynamic} [msg=""] - message to display in the test report
|
|
269
273
|
' * @returns {boolean} - true if the assert was satisfied, false otherwise
|
|
270
274
|
' */
|
|
271
|
-
function fail(msg = "Error" as string, actual = "" as string, expected = "" as string) as dynamic
|
|
275
|
+
function fail(msg = "Error" as string, actual = "" as string, expected = "" as string, createError = false as boolean) as dynamic
|
|
272
276
|
if m.currentResult.isFail
|
|
273
277
|
if m.throwOnFailedAssertion
|
|
274
278
|
throw m.currentResult.getMessage()
|
|
275
279
|
end if
|
|
276
280
|
return false
|
|
277
281
|
end if
|
|
278
|
-
|
|
282
|
+
|
|
283
|
+
error = invalid
|
|
284
|
+
if createError
|
|
285
|
+
try
|
|
286
|
+
throw msg
|
|
287
|
+
catch error
|
|
288
|
+
end try
|
|
289
|
+
end if
|
|
290
|
+
|
|
291
|
+
m.currentResult.fail(msg, m.currentAssertLineNumber, actual, expected, error)
|
|
279
292
|
return false
|
|
280
293
|
end function
|
|
281
294
|
|
|
@@ -354,7 +367,7 @@ namespace rooibos
|
|
|
354
367
|
if msg = ""
|
|
355
368
|
msg = `expected "${rooibos.common.truncateString(actual)}" to be ${rooibos.common.truncateString(expected)}`
|
|
356
369
|
end if
|
|
357
|
-
return m.fail(msg, actual, expected)
|
|
370
|
+
return m.fail(msg, actual, expected, true)
|
|
358
371
|
end if
|
|
359
372
|
return true
|
|
360
373
|
catch error
|
|
@@ -385,7 +398,7 @@ namespace rooibos
|
|
|
385
398
|
if msg = ""
|
|
386
399
|
msg = `expected "${rooibos.common.truncateString(actual)}" to be ${rooibos.common.truncateString(expected)}`
|
|
387
400
|
end if
|
|
388
|
-
return m.fail(msg, actual, expected)
|
|
401
|
+
return m.fail(msg, actual, expected, true)
|
|
389
402
|
end if
|
|
390
403
|
|
|
391
404
|
return true
|
|
@@ -420,7 +433,7 @@ namespace rooibos
|
|
|
420
433
|
messageExpected = rooibos.common.truncateString(expected)
|
|
421
434
|
msg = `expected "${messageActual}" to equal "${messageExpected}"`
|
|
422
435
|
end if
|
|
423
|
-
m.
|
|
436
|
+
m.fail(msg, actual, expected, true)
|
|
424
437
|
return false
|
|
425
438
|
end if
|
|
426
439
|
return true
|
|
@@ -456,7 +469,7 @@ namespace rooibos
|
|
|
456
469
|
messageExpected = rooibos.common.truncateString(expected)
|
|
457
470
|
msg = `expected "${messageActual}" to be like "${messageExpected}"`
|
|
458
471
|
end if
|
|
459
|
-
m.
|
|
472
|
+
m.fail(msg, actual, expected, true)
|
|
460
473
|
return false
|
|
461
474
|
end if
|
|
462
475
|
return true
|
|
@@ -492,7 +505,7 @@ namespace rooibos
|
|
|
492
505
|
messageExpected = rooibos.common.truncateString(expected)
|
|
493
506
|
msg = `expected "${messageActual}" to not equal "${messageExpected}"`
|
|
494
507
|
end if
|
|
495
|
-
m.
|
|
508
|
+
m.fail(msg, "", "", true)
|
|
496
509
|
return false
|
|
497
510
|
end if
|
|
498
511
|
return true
|
|
@@ -525,7 +538,7 @@ namespace rooibos
|
|
|
525
538
|
actual = rooibos.common.asMultilineString(value, true)
|
|
526
539
|
msg = `expected "${rooibos.common.truncateString(actual)}" to be invalid`
|
|
527
540
|
end if
|
|
528
|
-
m.
|
|
541
|
+
m.fail(msg, "", "", true)
|
|
529
542
|
return false
|
|
530
543
|
end if
|
|
531
544
|
return true
|
|
@@ -557,7 +570,7 @@ namespace rooibos
|
|
|
557
570
|
actual = rooibos.common.asMultilineString(value, true)
|
|
558
571
|
msg = `expected "${rooibos.common.truncateString(actual)}" to not be invalid`
|
|
559
572
|
end if
|
|
560
|
-
m.
|
|
573
|
+
m.fail(msg, "", "", true)
|
|
561
574
|
return false
|
|
562
575
|
end if
|
|
563
576
|
return true
|
|
@@ -589,7 +602,7 @@ namespace rooibos
|
|
|
589
602
|
if msg = ""
|
|
590
603
|
msg = `expected "${rooibos.common.truncateString(rooibos.common.asMultilineString(aa, true))}" to be an AssociativeArray`
|
|
591
604
|
end if
|
|
592
|
-
m.
|
|
605
|
+
m.fail(msg, "", "", true)
|
|
593
606
|
return false
|
|
594
607
|
end if
|
|
595
608
|
|
|
@@ -598,7 +611,7 @@ namespace rooibos
|
|
|
598
611
|
actual = rooibos.common.asMultilineString(aa, true)
|
|
599
612
|
msg = `expected "${rooibos.common.truncateString(actual)}" to have property "${key}"`
|
|
600
613
|
end if
|
|
601
|
-
m.
|
|
614
|
+
m.fail(msg, "", "", true)
|
|
602
615
|
return false
|
|
603
616
|
end if
|
|
604
617
|
return true
|
|
@@ -631,7 +644,7 @@ namespace rooibos
|
|
|
631
644
|
if msg = ""
|
|
632
645
|
msg = `expected "${rooibos.common.truncateString(rooibos.common.asMultilineString(aa, true))}" to be an AssociativeArray`
|
|
633
646
|
end if
|
|
634
|
-
m.
|
|
647
|
+
m.fail(msg, "", "", true)
|
|
635
648
|
return false
|
|
636
649
|
end if
|
|
637
650
|
|
|
@@ -640,7 +653,7 @@ namespace rooibos
|
|
|
640
653
|
actual = rooibos.common.asMultilineString(aa, true)
|
|
641
654
|
msg = `expected "${rooibos.common.truncateString(actual)}" to not have property "${key}"`
|
|
642
655
|
end if
|
|
643
|
-
m.
|
|
656
|
+
m.fail(msg, "", "", true)
|
|
644
657
|
return false
|
|
645
658
|
end if
|
|
646
659
|
return true
|
|
@@ -673,7 +686,7 @@ namespace rooibos
|
|
|
673
686
|
if msg = ""
|
|
674
687
|
msg = `expected "${rooibos.common.truncateString(rooibos.common.asMultilineString(aa, true))}" to be an AssociativeArray`
|
|
675
688
|
end if
|
|
676
|
-
m.
|
|
689
|
+
m.fail(msg, "", "", true)
|
|
677
690
|
return false
|
|
678
691
|
end if
|
|
679
692
|
|
|
@@ -681,7 +694,7 @@ namespace rooibos
|
|
|
681
694
|
if msg = ""
|
|
682
695
|
msg = `expected "${rooibos.common.truncateString(rooibos.common.asMultilineString(keys, true))}" to be an Array`
|
|
683
696
|
end if
|
|
684
|
-
m.
|
|
697
|
+
m.fail(msg, "", "", true)
|
|
685
698
|
return false
|
|
686
699
|
end if
|
|
687
700
|
|
|
@@ -701,7 +714,7 @@ namespace rooibos
|
|
|
701
714
|
if msg = ""
|
|
702
715
|
msg = `expected "${rooibos.common.truncateString(rooibos.common.asMultilineString(aa, true))}" to have properties ${rooibos.common.truncateString(missingKeys.join(", "))}`
|
|
703
716
|
end if
|
|
704
|
-
m.
|
|
717
|
+
m.fail(msg, actual, expected, true)
|
|
705
718
|
return false
|
|
706
719
|
end if
|
|
707
720
|
return true
|
|
@@ -733,7 +746,7 @@ namespace rooibos
|
|
|
733
746
|
if msg = ""
|
|
734
747
|
msg = `expected "${rooibos.common.truncateString(rooibos.common.asMultilineString(aa, true))}" to be an AssociativeArray`
|
|
735
748
|
end if
|
|
736
|
-
m.
|
|
749
|
+
m.fail(msg, "", "", true)
|
|
737
750
|
return false
|
|
738
751
|
end if
|
|
739
752
|
|
|
@@ -741,7 +754,7 @@ namespace rooibos
|
|
|
741
754
|
if msg = ""
|
|
742
755
|
msg = `expected "${rooibos.common.truncateString(rooibos.common.asMultilineString(keys, true))}" to be an Array`
|
|
743
756
|
end if
|
|
744
|
-
m.
|
|
757
|
+
m.fail(msg, "", "", true)
|
|
745
758
|
return false
|
|
746
759
|
end if
|
|
747
760
|
|
|
@@ -756,7 +769,7 @@ namespace rooibos
|
|
|
756
769
|
if msg = ""
|
|
757
770
|
msg = `expected "${rooibos.common.truncateString(rooibos.common.asMultilineString(aa, true))}" to not have properties ${rooibos.common.truncateString(foundKeys.join(", "))}`
|
|
758
771
|
end if
|
|
759
|
-
m.
|
|
772
|
+
m.fail(msg, "", "", true)
|
|
760
773
|
return false
|
|
761
774
|
end if
|
|
762
775
|
|
|
@@ -793,7 +806,7 @@ namespace rooibos
|
|
|
793
806
|
if msg = ""
|
|
794
807
|
msg = `expected "${rooibos.common.truncateString(rooibos.common.asMultilineString(array, true))}" to be an AssociativeArray or Array`
|
|
795
808
|
end if
|
|
796
|
-
m.
|
|
809
|
+
m.fail(msg, "", "", true)
|
|
797
810
|
return false
|
|
798
811
|
end if
|
|
799
812
|
|
|
@@ -801,7 +814,7 @@ namespace rooibos
|
|
|
801
814
|
if msg = ""
|
|
802
815
|
msg = `expected "${rooibos.common.truncateString(rooibos.common.asMultilineString(array, true))}" to contain "${rooibos.common.truncateString(rooibos.common.asMultilineString(value, true))}"`
|
|
803
816
|
end if
|
|
804
|
-
m.
|
|
817
|
+
m.fail(msg, "", "", true)
|
|
805
818
|
return false
|
|
806
819
|
end if
|
|
807
820
|
return true
|
|
@@ -834,7 +847,7 @@ namespace rooibos
|
|
|
834
847
|
if msg = ""
|
|
835
848
|
msg = `expected value "${rooibos.common.truncateString(rooibos.common.asMultilineString(values, true))}" must be an Array`
|
|
836
849
|
end if
|
|
837
|
-
m.
|
|
850
|
+
m.fail(msg, "", "", true)
|
|
838
851
|
return false
|
|
839
852
|
end if
|
|
840
853
|
|
|
@@ -842,7 +855,7 @@ namespace rooibos
|
|
|
842
855
|
if msg = ""
|
|
843
856
|
msg = `actual value "${rooibos.common.truncateString(rooibos.common.asMultilineString(array, true))}" must be an Array`
|
|
844
857
|
end if
|
|
845
|
-
m.
|
|
858
|
+
m.fail(msg, "", "", true)
|
|
846
859
|
return false
|
|
847
860
|
end if
|
|
848
861
|
|
|
@@ -852,7 +865,7 @@ namespace rooibos
|
|
|
852
865
|
if msg = ""
|
|
853
866
|
msg = `expected search value "${rooibos.common.truncateString(rooibos.common.asMultilineString(value, true))}" to be an AssociativeArray`
|
|
854
867
|
end if
|
|
855
|
-
m.
|
|
868
|
+
m.fail(msg, "", "", true)
|
|
856
869
|
return false
|
|
857
870
|
end if
|
|
858
871
|
for each item in array
|
|
@@ -877,7 +890,7 @@ namespace rooibos
|
|
|
877
890
|
if msg = ""
|
|
878
891
|
msg = `expected "${rooibos.common.truncateString(rooibos.common.asMultilineString(array, true))}" to contain "${rooibos.common.truncateString(rooibos.common.asMultilineString(value, true))}"`
|
|
879
892
|
end if
|
|
880
|
-
m.
|
|
893
|
+
m.fail(msg, "", "", true)
|
|
881
894
|
return false
|
|
882
895
|
end if
|
|
883
896
|
|
|
@@ -913,7 +926,7 @@ namespace rooibos
|
|
|
913
926
|
if msg = ""
|
|
914
927
|
msg = `expected "${rooibos.common.truncateString(rooibos.common.asMultilineString(array, true))}" to be an AssociativeArray or Array`
|
|
915
928
|
end if
|
|
916
|
-
m.
|
|
929
|
+
m.fail(msg, "", "", true)
|
|
917
930
|
return false
|
|
918
931
|
end if
|
|
919
932
|
|
|
@@ -921,7 +934,7 @@ namespace rooibos
|
|
|
921
934
|
if msg = ""
|
|
922
935
|
msg = `expected "${rooibos.common.truncateString(rooibos.common.asMultilineString(array, true))}" to not contain "${rooibos.common.truncateString(rooibos.common.asMultilineString(value, true))}"`
|
|
923
936
|
end if
|
|
924
|
-
m.
|
|
937
|
+
m.fail(msg, "", "", true)
|
|
925
938
|
return false
|
|
926
939
|
end if
|
|
927
940
|
|
|
@@ -954,7 +967,7 @@ namespace rooibos
|
|
|
954
967
|
if msg = ""
|
|
955
968
|
msg = `expected target "${rooibos.common.truncateString(rooibos.common.asMultilineString(array, true))}" to be an AssociativeArray or Array`
|
|
956
969
|
end if
|
|
957
|
-
m.
|
|
970
|
+
m.fail(msg, "", "", true)
|
|
958
971
|
return false
|
|
959
972
|
end if
|
|
960
973
|
|
|
@@ -962,7 +975,7 @@ namespace rooibos
|
|
|
962
975
|
if msg = ""
|
|
963
976
|
msg = `expected subset "${rooibos.common.truncateString(rooibos.common.asMultilineString(subset, true))}" to be an AssociativeArray or Array`
|
|
964
977
|
end if
|
|
965
|
-
m.
|
|
978
|
+
m.fail(msg, "", "", true)
|
|
966
979
|
return false
|
|
967
980
|
end if
|
|
968
981
|
|
|
@@ -970,7 +983,7 @@ namespace rooibos
|
|
|
970
983
|
if msg = ""
|
|
971
984
|
msg = `expected subset "${rooibos.common.truncateString(rooibos.common.asMultilineString(subset, true))}" to be an AssociativeArray to match type "${rooibos.common.truncateString(rooibos.common.asMultilineString(array, true))}"`
|
|
972
985
|
end if
|
|
973
|
-
m.
|
|
986
|
+
m.fail(msg, "", "", true)
|
|
974
987
|
return false
|
|
975
988
|
end if
|
|
976
989
|
|
|
@@ -978,7 +991,7 @@ namespace rooibos
|
|
|
978
991
|
if msg = ""
|
|
979
992
|
msg = `expected subset "${rooibos.common.truncateString(rooibos.common.asMultilineString(subset, true))}" to be an Array to match type "${rooibos.common.truncateString(rooibos.common.asMultilineString(array, true))}"`
|
|
980
993
|
end if
|
|
981
|
-
m.
|
|
994
|
+
m.fail(msg, "", "", true)
|
|
982
995
|
return false
|
|
983
996
|
end if
|
|
984
997
|
|
|
@@ -998,7 +1011,7 @@ namespace rooibos
|
|
|
998
1011
|
msg = `expected "${rooibos.common.truncateString(rooibos.common.asMultilineString(array, true))}" to contain "${rooibos.common.truncateString(rooibos.common.asMultilineString(value, true))}"`
|
|
999
1012
|
end if
|
|
1000
1013
|
end if
|
|
1001
|
-
m.
|
|
1014
|
+
m.fail(msg, "", "", true)
|
|
1002
1015
|
return false
|
|
1003
1016
|
end if
|
|
1004
1017
|
end for
|
|
@@ -1032,7 +1045,7 @@ namespace rooibos
|
|
|
1032
1045
|
if msg = ""
|
|
1033
1046
|
msg = `expected target "${rooibos.common.truncateString(rooibos.common.asMultilineString(array, true))}" to be an AssociativeArray or Array`
|
|
1034
1047
|
end if
|
|
1035
|
-
m.
|
|
1048
|
+
m.fail(msg, "", "", true)
|
|
1036
1049
|
return false
|
|
1037
1050
|
end if
|
|
1038
1051
|
|
|
@@ -1040,7 +1053,7 @@ namespace rooibos
|
|
|
1040
1053
|
if msg = ""
|
|
1041
1054
|
msg = `expected subset "${rooibos.common.truncateString(rooibos.common.asMultilineString(subset, true))}" to be an AssociativeArray or Array`
|
|
1042
1055
|
end if
|
|
1043
|
-
m.
|
|
1056
|
+
m.fail(msg, "", "", true)
|
|
1044
1057
|
return false
|
|
1045
1058
|
end if
|
|
1046
1059
|
|
|
@@ -1048,7 +1061,7 @@ namespace rooibos
|
|
|
1048
1061
|
if msg = ""
|
|
1049
1062
|
msg = `expected subset "${rooibos.common.truncateString(rooibos.common.asMultilineString(subset, true))}" to be an AssociativeArray to match type "${rooibos.common.truncateString(rooibos.common.asMultilineString(array, true))}"`
|
|
1050
1063
|
end if
|
|
1051
|
-
m.
|
|
1064
|
+
m.fail(msg, "", "", true)
|
|
1052
1065
|
return false
|
|
1053
1066
|
end if
|
|
1054
1067
|
|
|
@@ -1056,7 +1069,7 @@ namespace rooibos
|
|
|
1056
1069
|
if msg = ""
|
|
1057
1070
|
msg = `expected subset "${rooibos.common.truncateString(rooibos.common.asMultilineString(subset, true))}" to be an Array to match type "${rooibos.common.truncateString(rooibos.common.asMultilineString(array, true))}"`
|
|
1058
1071
|
end if
|
|
1059
|
-
m.
|
|
1072
|
+
m.fail(msg, "", "", true)
|
|
1060
1073
|
return false
|
|
1061
1074
|
end if
|
|
1062
1075
|
|
|
@@ -1076,7 +1089,7 @@ namespace rooibos
|
|
|
1076
1089
|
msg = `expected "${rooibos.common.truncateString(rooibos.common.asMultilineString(array, true))}" to not contain "${rooibos.common.truncateString(rooibos.common.asMultilineString(value, true))}"`
|
|
1077
1090
|
end if
|
|
1078
1091
|
end if
|
|
1079
|
-
m.
|
|
1092
|
+
m.fail(msg, "", "", true)
|
|
1080
1093
|
return false
|
|
1081
1094
|
end if
|
|
1082
1095
|
end for
|
|
@@ -1109,7 +1122,7 @@ namespace rooibos
|
|
|
1109
1122
|
if msg = ""
|
|
1110
1123
|
msg = `expected "${rooibos.common.truncateString(rooibos.common.asMultilineString(array, true))}" to be an AssociativeArray or Array`
|
|
1111
1124
|
end if
|
|
1112
|
-
m.
|
|
1125
|
+
m.fail(msg, "", "", true)
|
|
1113
1126
|
return false
|
|
1114
1127
|
end if
|
|
1115
1128
|
|
|
@@ -1117,7 +1130,7 @@ namespace rooibos
|
|
|
1117
1130
|
if msg = ""
|
|
1118
1131
|
msg = `expected "${rooibos.common.truncateString(rooibos.common.asMultilineString(count, true))}" to be an Number`
|
|
1119
1132
|
end if
|
|
1120
|
-
m.
|
|
1133
|
+
m.fail(msg, "", "", true)
|
|
1121
1134
|
return false
|
|
1122
1135
|
end if
|
|
1123
1136
|
|
|
@@ -1131,7 +1144,7 @@ namespace rooibos
|
|
|
1131
1144
|
if msg = ""
|
|
1132
1145
|
msg = `expected count "${actualCount}" to be "${count}"`
|
|
1133
1146
|
end if
|
|
1134
|
-
m.
|
|
1147
|
+
m.fail(msg, rooibos.common.asMultilineString(actualCount, true), rooibos.common.asMultilineString(count, true), true)
|
|
1135
1148
|
return false
|
|
1136
1149
|
end if
|
|
1137
1150
|
return true
|
|
@@ -1163,7 +1176,7 @@ namespace rooibos
|
|
|
1163
1176
|
if msg = ""
|
|
1164
1177
|
msg = `expected "${rooibos.common.truncateString(rooibos.common.asMultilineString(array, true))}" to be an AssociativeArray or Array`
|
|
1165
1178
|
end if
|
|
1166
|
-
m.
|
|
1179
|
+
m.fail(msg, "", "", true)
|
|
1167
1180
|
return false
|
|
1168
1181
|
end if
|
|
1169
1182
|
|
|
@@ -1171,7 +1184,7 @@ namespace rooibos
|
|
|
1171
1184
|
if msg = ""
|
|
1172
1185
|
msg = `expected "${rooibos.common.truncateString(rooibos.common.asMultilineString(count, true))}" to be an Number`
|
|
1173
1186
|
end if
|
|
1174
|
-
m.
|
|
1187
|
+
m.fail(msg, "", "", true)
|
|
1175
1188
|
return false
|
|
1176
1189
|
end if
|
|
1177
1190
|
|
|
@@ -1185,7 +1198,7 @@ namespace rooibos
|
|
|
1185
1198
|
if msg = ""
|
|
1186
1199
|
msg = `expected count "${actualCount}" to not be "${count}"`
|
|
1187
1200
|
end if
|
|
1188
|
-
m.
|
|
1201
|
+
m.fail(msg, "", "", true)
|
|
1189
1202
|
return false
|
|
1190
1203
|
end if
|
|
1191
1204
|
|
|
@@ -1219,7 +1232,7 @@ namespace rooibos
|
|
|
1219
1232
|
if msg = ""
|
|
1220
1233
|
msg = `expected "${rooibos.common.truncateString(actual)}" to be empty`
|
|
1221
1234
|
end if
|
|
1222
|
-
m.
|
|
1235
|
+
m.fail(msg, actual, rooibos.common.asMultilineString({}, true), true)
|
|
1223
1236
|
return false
|
|
1224
1237
|
end if
|
|
1225
1238
|
else if rooibos.common.isArray(item)
|
|
@@ -1228,7 +1241,7 @@ namespace rooibos
|
|
|
1228
1241
|
if msg = ""
|
|
1229
1242
|
msg = `expected "${rooibos.common.truncateString(actual)}" to be empty`
|
|
1230
1243
|
end if
|
|
1231
|
-
m.
|
|
1244
|
+
m.fail(msg, actual, rooibos.common.asMultilineString([], true), true)
|
|
1232
1245
|
return false
|
|
1233
1246
|
end if
|
|
1234
1247
|
else if rooibos.common.isString(item)
|
|
@@ -1237,14 +1250,14 @@ namespace rooibos
|
|
|
1237
1250
|
if msg = ""
|
|
1238
1251
|
msg = `expected ${rooibos.common.truncateString(actual)} to be empty`
|
|
1239
1252
|
end if
|
|
1240
|
-
m.
|
|
1253
|
+
m.fail(msg, actual, "", true)
|
|
1241
1254
|
return false
|
|
1242
1255
|
end if
|
|
1243
1256
|
else
|
|
1244
1257
|
if msg = ""
|
|
1245
1258
|
msg = `expected "${rooibos.common.truncateString(rooibos.common.asMultilineString(item, true))}" to be an AssociativeArray, Array, or String`
|
|
1246
1259
|
end if
|
|
1247
|
-
m.
|
|
1260
|
+
m.fail(msg, "", "", true)
|
|
1248
1261
|
return false
|
|
1249
1262
|
end if
|
|
1250
1263
|
return true
|
|
@@ -1277,7 +1290,7 @@ namespace rooibos
|
|
|
1277
1290
|
actual = rooibos.common.asMultilineString(item, true)
|
|
1278
1291
|
msg = `expected "${rooibos.common.truncateString(actual)}" to not be empty`
|
|
1279
1292
|
end if
|
|
1280
|
-
m.
|
|
1293
|
+
m.fail(msg, "", "", true)
|
|
1281
1294
|
return false
|
|
1282
1295
|
end if
|
|
1283
1296
|
else if rooibos.common.isArray(item)
|
|
@@ -1286,7 +1299,7 @@ namespace rooibos
|
|
|
1286
1299
|
actual = rooibos.common.asMultilineString(item, true)
|
|
1287
1300
|
msg = `expected "${rooibos.common.truncateString(actual)}" to not be empty`
|
|
1288
1301
|
end if
|
|
1289
|
-
m.
|
|
1302
|
+
m.fail(msg, "", "", true)
|
|
1290
1303
|
return false
|
|
1291
1304
|
end if
|
|
1292
1305
|
else if rooibos.common.isString(item)
|
|
@@ -1295,14 +1308,14 @@ namespace rooibos
|
|
|
1295
1308
|
actual = rooibos.common.asMultilineString(item, true)
|
|
1296
1309
|
msg = `expected ${rooibos.common.truncateString(actual)} to be empty`
|
|
1297
1310
|
end if
|
|
1298
|
-
m.
|
|
1311
|
+
m.fail(msg, "", "", true)
|
|
1299
1312
|
return false
|
|
1300
1313
|
end if
|
|
1301
1314
|
else
|
|
1302
1315
|
if msg = ""
|
|
1303
1316
|
msg = `expected "${rooibos.common.truncateString(rooibos.common.asMultilineString(item, true))}" to be an AssociativeArray, Array, or String`
|
|
1304
1317
|
end if
|
|
1305
|
-
m.
|
|
1318
|
+
m.fail(msg, "", "", true)
|
|
1306
1319
|
return false
|
|
1307
1320
|
end if
|
|
1308
1321
|
return true
|
|
@@ -1334,7 +1347,7 @@ namespace rooibos
|
|
|
1334
1347
|
if msg = ""
|
|
1335
1348
|
msg = `expect type ${rooibos.common.asMultilineString(typeStr, true)} to be "Boolean", "String", "Integer", "Array", or "AssociativeArray"`
|
|
1336
1349
|
end if
|
|
1337
|
-
m.
|
|
1350
|
+
m.fail(msg, "", "", true)
|
|
1338
1351
|
return false
|
|
1339
1352
|
end if
|
|
1340
1353
|
|
|
@@ -1342,7 +1355,7 @@ namespace rooibos
|
|
|
1342
1355
|
if msg = ""
|
|
1343
1356
|
msg = `expected "${rooibos.common.truncateString(rooibos.common.asMultilineString(array, true))}" to be an AssociativeArray or Array`
|
|
1344
1357
|
end if
|
|
1345
|
-
m.
|
|
1358
|
+
m.fail(msg, "", "", true)
|
|
1346
1359
|
return false
|
|
1347
1360
|
end if
|
|
1348
1361
|
|
|
@@ -1364,7 +1377,7 @@ namespace rooibos
|
|
|
1364
1377
|
msg = `expected "${rooibos.common.truncateString(rooibos.common.asMultilineString(item, true))}" to be type ${rooibos.common.asMultilineString(typeStr, true)}`
|
|
1365
1378
|
end if
|
|
1366
1379
|
end if
|
|
1367
|
-
m.
|
|
1380
|
+
m.fail(msg, "", "", true)
|
|
1368
1381
|
return false
|
|
1369
1382
|
end if
|
|
1370
1383
|
end for
|
|
@@ -1440,7 +1453,7 @@ namespace rooibos
|
|
|
1440
1453
|
if msg = ""
|
|
1441
1454
|
msg = `expected ${rooibos.common.truncateString(actual)} to be type ${rooibos.common.truncateString(expected)}`
|
|
1442
1455
|
end if
|
|
1443
|
-
m.
|
|
1456
|
+
m.fail(msg, actual, expected, true)
|
|
1444
1457
|
return false
|
|
1445
1458
|
end if
|
|
1446
1459
|
return true
|
|
@@ -1475,7 +1488,7 @@ namespace rooibos
|
|
|
1475
1488
|
if msg = ""
|
|
1476
1489
|
msg = `expected type "${rooibos.common.truncateString(actual)}" to be type "${rooibos.common.truncateString(expected)}"`
|
|
1477
1490
|
end if
|
|
1478
|
-
m.
|
|
1491
|
+
m.fail(msg, actual, expected, true)
|
|
1479
1492
|
return false
|
|
1480
1493
|
else if value.subType() <> typeStr
|
|
1481
1494
|
actual = rooibos.common.getTypeWithComponentWrapper(value, true)
|
|
@@ -1483,7 +1496,7 @@ namespace rooibos
|
|
|
1483
1496
|
if msg = ""
|
|
1484
1497
|
msg = `expected type "${rooibos.common.truncateString(actual)}" to be type "${rooibos.common.truncateString(expected)}"`
|
|
1485
1498
|
end if
|
|
1486
|
-
m.
|
|
1499
|
+
m.fail(msg, actual, expected, true)
|
|
1487
1500
|
return false
|
|
1488
1501
|
end if
|
|
1489
1502
|
return true
|
|
@@ -1507,7 +1520,7 @@ namespace rooibos
|
|
|
1507
1520
|
if msg = ""
|
|
1508
1521
|
msg = `expected "${rooibos.common.truncateString(rooibos.common.asMultilineString(value, true))}" to be an instance of ${rooibos.common.truncateString(rooibos.common.asMultilineString(expectedClassName, true))}`
|
|
1509
1522
|
end if
|
|
1510
|
-
m.
|
|
1523
|
+
m.fail(msg, "", "", true)
|
|
1511
1524
|
return false
|
|
1512
1525
|
end if
|
|
1513
1526
|
|
|
@@ -1515,7 +1528,7 @@ namespace rooibos
|
|
|
1515
1528
|
if msg = ""
|
|
1516
1529
|
msg = `expected "${rooibos.common.truncateString(rooibos.common.asMultilineString(value, true))}" to be an instance of ${rooibos.common.truncateString(rooibos.common.asMultilineString(expectedClassName, true))}`
|
|
1517
1530
|
end if
|
|
1518
|
-
m.
|
|
1531
|
+
m.fail(msg, "", "", true)
|
|
1519
1532
|
return false
|
|
1520
1533
|
end if
|
|
1521
1534
|
|
|
@@ -1533,7 +1546,7 @@ namespace rooibos
|
|
|
1533
1546
|
if msg = ""
|
|
1534
1547
|
msg = `expected class ${rooibos.common.truncateString(actual)} to be an instance of ${rooibos.common.truncateString(expected)}`
|
|
1535
1548
|
end if
|
|
1536
|
-
m.
|
|
1549
|
+
m.fail(msg, "", "", true)
|
|
1537
1550
|
return false
|
|
1538
1551
|
end if
|
|
1539
1552
|
return true
|
|
@@ -1578,7 +1591,7 @@ namespace rooibos
|
|
|
1578
1591
|
if msg = ""
|
|
1579
1592
|
msg = `expected count "${actual}" to be "${expected}"`
|
|
1580
1593
|
end if
|
|
1581
|
-
m.
|
|
1594
|
+
m.fail(msg, actual, expected, true)
|
|
1582
1595
|
return false
|
|
1583
1596
|
end if
|
|
1584
1597
|
else
|
|
@@ -1587,7 +1600,7 @@ namespace rooibos
|
|
|
1587
1600
|
if msg = ""
|
|
1588
1601
|
msg = `expected type "${rooibos.common.truncateString(actual)}" to be type "${rooibos.common.truncateString(expected)}"`
|
|
1589
1602
|
end if
|
|
1590
|
-
m.
|
|
1603
|
+
m.fail(msg, actual, expected, true)
|
|
1591
1604
|
return false
|
|
1592
1605
|
end if
|
|
1593
1606
|
return true
|
|
@@ -1627,7 +1640,7 @@ namespace rooibos
|
|
|
1627
1640
|
if msg = ""
|
|
1628
1641
|
msg = `expected count "${actual}" to not be "${expected}"`
|
|
1629
1642
|
end if
|
|
1630
|
-
m.
|
|
1643
|
+
m.fail(msg, actual, expected, true)
|
|
1631
1644
|
return false
|
|
1632
1645
|
end if
|
|
1633
1646
|
else
|
|
@@ -1636,7 +1649,7 @@ namespace rooibos
|
|
|
1636
1649
|
if msg = ""
|
|
1637
1650
|
msg = `expected type "${rooibos.common.truncateString(actual)}" to be type "${rooibos.common.truncateString(expected)}"`
|
|
1638
1651
|
end if
|
|
1639
|
-
m.
|
|
1652
|
+
m.fail(msg, actual, expected, true)
|
|
1640
1653
|
return false
|
|
1641
1654
|
end if
|
|
1642
1655
|
return true
|
|
@@ -1673,7 +1686,7 @@ namespace rooibos
|
|
|
1673
1686
|
if msg = ""
|
|
1674
1687
|
msg = `expected child count "${childCount}" to be "0"`
|
|
1675
1688
|
end if
|
|
1676
|
-
m.
|
|
1689
|
+
m.fail(msg, "", "", true)
|
|
1677
1690
|
return false
|
|
1678
1691
|
end if
|
|
1679
1692
|
else
|
|
@@ -1682,7 +1695,7 @@ namespace rooibos
|
|
|
1682
1695
|
if msg = ""
|
|
1683
1696
|
msg = `expected type "${rooibos.common.truncateString(actual)}" to be type "${rooibos.common.truncateString(expected)}"`
|
|
1684
1697
|
end if
|
|
1685
|
-
m.
|
|
1698
|
+
m.fail(msg, actual, expected, true)
|
|
1686
1699
|
return false
|
|
1687
1700
|
end if
|
|
1688
1701
|
return true
|
|
@@ -1720,7 +1733,7 @@ namespace rooibos
|
|
|
1720
1733
|
if msg = ""
|
|
1721
1734
|
msg = `expected child count "${childCount}" to be greater then "0"`
|
|
1722
1735
|
end if
|
|
1723
|
-
m.
|
|
1736
|
+
m.fail(msg, "", "", true)
|
|
1724
1737
|
return false
|
|
1725
1738
|
end if
|
|
1726
1739
|
else
|
|
@@ -1729,7 +1742,7 @@ namespace rooibos
|
|
|
1729
1742
|
if msg = ""
|
|
1730
1743
|
msg = `expected type "${rooibos.common.truncateString(actual)}" to be type "${rooibos.common.truncateString(expected)}"`
|
|
1731
1744
|
end if
|
|
1732
|
-
m.
|
|
1745
|
+
m.fail(msg, actual, expected, true)
|
|
1733
1746
|
return false
|
|
1734
1747
|
end if
|
|
1735
1748
|
return true
|
|
@@ -1762,7 +1775,7 @@ namespace rooibos
|
|
|
1762
1775
|
if msg = ""
|
|
1763
1776
|
msg = `expected "${rooibos.common.truncateString(rooibos.common.getTypeWithComponentWrapper(node, true))}" to contain child "${rooibos.common.truncateString(rooibos.common.getTypeWithComponentWrapper(value, true))}" by reference`
|
|
1764
1777
|
end if
|
|
1765
|
-
m.
|
|
1778
|
+
m.fail(msg, "", "", true)
|
|
1766
1779
|
return false
|
|
1767
1780
|
end if
|
|
1768
1781
|
else
|
|
@@ -1771,7 +1784,7 @@ namespace rooibos
|
|
|
1771
1784
|
if msg = ""
|
|
1772
1785
|
msg = `expected type "${rooibos.common.truncateString(actual)}" to be type "${rooibos.common.truncateString(expected)}"`
|
|
1773
1786
|
end if
|
|
1774
|
-
m.
|
|
1787
|
+
m.fail(msg, actual, expected, true)
|
|
1775
1788
|
return false
|
|
1776
1789
|
end if
|
|
1777
1790
|
return true
|
|
@@ -1803,7 +1816,7 @@ namespace rooibos
|
|
|
1803
1816
|
if msg = ""
|
|
1804
1817
|
msg = `expected "${rooibos.common.truncateString(rooibos.common.getTypeWithComponentWrapper(node, true))}" to contain child "${rooibos.common.truncateString(rooibos.common.getTypeWithComponentWrapper(value, true))}" by reference`
|
|
1805
1818
|
end if
|
|
1806
|
-
m.
|
|
1819
|
+
m.fail(msg, "", "", true)
|
|
1807
1820
|
return false
|
|
1808
1821
|
else
|
|
1809
1822
|
if node.isSubType("mc_Node")
|
|
@@ -1816,7 +1829,7 @@ namespace rooibos
|
|
|
1816
1829
|
if msg = ""
|
|
1817
1830
|
msg = `expected child count "${childCount}" to be "1"`
|
|
1818
1831
|
end if
|
|
1819
|
-
m.
|
|
1832
|
+
m.fail(msg, "", "", true)
|
|
1820
1833
|
return false
|
|
1821
1834
|
end if
|
|
1822
1835
|
end if
|
|
@@ -1826,7 +1839,7 @@ namespace rooibos
|
|
|
1826
1839
|
if msg = ""
|
|
1827
1840
|
msg = `expected type "${rooibos.common.truncateString(actual)}" to be type "${rooibos.common.truncateString(expected)}"`
|
|
1828
1841
|
end if
|
|
1829
|
-
m.
|
|
1842
|
+
m.fail(msg, actual, expected, true)
|
|
1830
1843
|
return false
|
|
1831
1844
|
end if
|
|
1832
1845
|
return true
|
|
@@ -1860,7 +1873,7 @@ namespace rooibos
|
|
|
1860
1873
|
if msg = ""
|
|
1861
1874
|
msg = `expected "${rooibos.common.truncateString(rooibos.common.getTypeWithComponentWrapper(node, true))}" to not contain child "${rooibos.common.truncateString(rooibos.common.getTypeWithComponentWrapper(value, true))}" by reference`
|
|
1862
1875
|
end if
|
|
1863
|
-
m.
|
|
1876
|
+
m.fail(msg, "", "", true)
|
|
1864
1877
|
return false
|
|
1865
1878
|
end if
|
|
1866
1879
|
else
|
|
@@ -1869,7 +1882,7 @@ namespace rooibos
|
|
|
1869
1882
|
if msg = ""
|
|
1870
1883
|
msg = `expected type "${rooibos.common.truncateString(actual)}" to be type "${rooibos.common.truncateString(expected)}"`
|
|
1871
1884
|
end if
|
|
1872
|
-
m.
|
|
1885
|
+
m.fail(msg, actual, expected, true)
|
|
1873
1886
|
return false
|
|
1874
1887
|
end if
|
|
1875
1888
|
return true
|
|
@@ -1904,7 +1917,7 @@ namespace rooibos
|
|
|
1904
1917
|
if msg = ""
|
|
1905
1918
|
msg = `expected type "${rooibos.common.truncateString(actual)}" to be type "${rooibos.common.truncateString(expected)}"`
|
|
1906
1919
|
end if
|
|
1907
|
-
m.
|
|
1920
|
+
m.fail(msg, actual, expected, true)
|
|
1908
1921
|
return false
|
|
1909
1922
|
end if
|
|
1910
1923
|
|
|
@@ -1912,7 +1925,7 @@ namespace rooibos
|
|
|
1912
1925
|
if msg = ""
|
|
1913
1926
|
msg = `expected subset "${rooibos.common.truncateString(rooibos.common.asMultilineString(subset, true))}" to be an AssociativeArray`
|
|
1914
1927
|
end if
|
|
1915
|
-
m.
|
|
1928
|
+
m.fail(msg, "", "", true)
|
|
1916
1929
|
return false
|
|
1917
1930
|
end if
|
|
1918
1931
|
|
|
@@ -1947,7 +1960,7 @@ namespace rooibos
|
|
|
1947
1960
|
msg = `expected "${rooibos.common.truncateString(rooibos.common.getTypeWithComponentWrapper(node, true))}" to have properties "${rooibos.common.truncateString(rooibos.common.asMultilineString(missingValues))}"`
|
|
1948
1961
|
end if
|
|
1949
1962
|
end if
|
|
1950
|
-
m.
|
|
1963
|
+
m.fail(msg, actual, expected, true)
|
|
1951
1964
|
return false
|
|
1952
1965
|
end if
|
|
1953
1966
|
return true
|
|
@@ -1982,7 +1995,7 @@ namespace rooibos
|
|
|
1982
1995
|
if msg = ""
|
|
1983
1996
|
msg = `expected type "${rooibos.common.truncateString(actual)}" to be type "${rooibos.common.truncateString(expected)}"`
|
|
1984
1997
|
end if
|
|
1985
|
-
m.
|
|
1998
|
+
m.fail(msg, actual, expected, true)
|
|
1986
1999
|
return false
|
|
1987
2000
|
end if
|
|
1988
2001
|
|
|
@@ -1995,7 +2008,7 @@ namespace rooibos
|
|
|
1995
2008
|
if msg = ""
|
|
1996
2009
|
msg = `expected "${rooibos.common.truncateString(rooibos.common.getTypeWithComponentWrapper(node, true))}" to not contain child "${rooibos.common.truncateString(rooibos.common.getTypeWithComponentWrapper(value, true))}" by reference`
|
|
1997
2010
|
end if
|
|
1998
|
-
m.
|
|
2011
|
+
m.fail(msg, "", "", true)
|
|
1999
2012
|
return false
|
|
2000
2013
|
end if
|
|
2001
2014
|
end for
|
|
@@ -2015,14 +2028,14 @@ namespace rooibos
|
|
|
2015
2028
|
if msg = ""
|
|
2016
2029
|
msg = `expected "${rooibos.common.truncateString(rooibos.common.getTypeWithComponentWrapper(node, true))}" to have not have properties "${rooibos.common.truncateString(rooibos.common.asMultilineString(foundValues))}"`
|
|
2017
2030
|
end if
|
|
2018
|
-
m.
|
|
2031
|
+
m.fail(msg, actual, expected, true)
|
|
2019
2032
|
return false
|
|
2020
2033
|
end if
|
|
2021
2034
|
else
|
|
2022
2035
|
if msg = ""
|
|
2023
2036
|
msg = `expected subset "${rooibos.common.truncateString(rooibos.common.asMultilineString(subset, true))}" to be an AssociativeArray`
|
|
2024
2037
|
end if
|
|
2025
|
-
m.
|
|
2038
|
+
m.fail(msg, "", "", true)
|
|
2026
2039
|
return false
|
|
2027
2040
|
end if
|
|
2028
2041
|
return true
|
|
@@ -2059,7 +2072,7 @@ namespace rooibos
|
|
|
2059
2072
|
if msg = ""
|
|
2060
2073
|
msg = `expected target "${rooibos.common.truncateString(rooibos.common.asMultilineString(array, true))}" to be an AssociativeArray`
|
|
2061
2074
|
end if
|
|
2062
|
-
m.
|
|
2075
|
+
m.fail(msg, "", "", true)
|
|
2063
2076
|
return false
|
|
2064
2077
|
end if
|
|
2065
2078
|
|
|
@@ -2067,7 +2080,7 @@ namespace rooibos
|
|
|
2067
2080
|
if msg = ""
|
|
2068
2081
|
msg = `expected subset "${rooibos.common.truncateString(rooibos.common.asMultilineString(subset, true))}" to be an AssociativeArray`
|
|
2069
2082
|
end if
|
|
2070
|
-
m.
|
|
2083
|
+
m.fail(msg, "", "", true)
|
|
2071
2084
|
return false
|
|
2072
2085
|
end if
|
|
2073
2086
|
|
|
@@ -2100,7 +2113,7 @@ namespace rooibos
|
|
|
2100
2113
|
if msg = ""
|
|
2101
2114
|
msg = `expected "${rooibos.common.truncateString(rooibos.common.asMultilineString(array, true))}" to have properties "${rooibos.common.truncateString(rooibos.common.asMultilineString(missingValues))}"`
|
|
2102
2115
|
end if
|
|
2103
|
-
m.
|
|
2116
|
+
m.fail(msg, actual, expected, true)
|
|
2104
2117
|
return false
|
|
2105
2118
|
end if
|
|
2106
2119
|
return true
|
|
@@ -2196,7 +2209,7 @@ namespace rooibos
|
|
|
2196
2209
|
return m.mock(target, methodName, 1, expectedArgs, returnValue, true)
|
|
2197
2210
|
catch error
|
|
2198
2211
|
'bs:disable-next-line
|
|
2199
|
-
m.
|
|
2212
|
+
m.fail("Setting up mock failed: " + error.message, "", "", true)
|
|
2200
2213
|
end try
|
|
2201
2214
|
return invalid
|
|
2202
2215
|
end function
|
|
@@ -2231,7 +2244,7 @@ namespace rooibos
|
|
|
2231
2244
|
return m.stub(target, methodName, returnValue, true)
|
|
2232
2245
|
catch error
|
|
2233
2246
|
'bs:disable-next-line
|
|
2234
|
-
m.
|
|
2247
|
+
m.fail("Setting up mock failed: " + error.message, "", "", true)
|
|
2235
2248
|
return false
|
|
2236
2249
|
end try
|
|
2237
2250
|
return false
|
|
@@ -2250,7 +2263,7 @@ namespace rooibos
|
|
|
2250
2263
|
return m.mock(target, methodName, 0, invalid, invalid, true)
|
|
2251
2264
|
catch error
|
|
2252
2265
|
'bs:disable-next-line
|
|
2253
|
-
m.
|
|
2266
|
+
m.fail("Setting up mock failed: " + error.message, "", "", true)
|
|
2254
2267
|
return false
|
|
2255
2268
|
end try
|
|
2256
2269
|
return false
|
|
@@ -2280,7 +2293,7 @@ namespace rooibos
|
|
|
2280
2293
|
return m.mock(target, methodName, 1, expectedArgs, returnValue, allowNonExistingMethods)
|
|
2281
2294
|
' catch error
|
|
2282
2295
|
'bs:disable-next-line
|
|
2283
|
-
' m.
|
|
2296
|
+
' m.fail("Setting up mock failed: " + error.message, "", "", true)
|
|
2284
2297
|
' return false
|
|
2285
2298
|
' end try
|
|
2286
2299
|
' return false
|
|
@@ -2309,7 +2322,7 @@ namespace rooibos
|
|
|
2309
2322
|
end if
|
|
2310
2323
|
catch error
|
|
2311
2324
|
'bs:disable-next-line
|
|
2312
|
-
m.
|
|
2325
|
+
m.fail("Setting up mock failed: " + error.message, "", "", true)
|
|
2313
2326
|
end try
|
|
2314
2327
|
return false
|
|
2315
2328
|
end function
|
|
@@ -2330,7 +2343,7 @@ namespace rooibos
|
|
|
2330
2343
|
return m.mock(target, methodName, 0, invalid, invalid, allowNonExistingMethods)
|
|
2331
2344
|
catch error
|
|
2332
2345
|
'bs:disable-next-line
|
|
2333
|
-
m.
|
|
2346
|
+
m.fail("Setting up mock failed: " + error.message, "", "", true)
|
|
2334
2347
|
end try
|
|
2335
2348
|
return false
|
|
2336
2349
|
end function
|
|
@@ -2354,7 +2367,7 @@ namespace rooibos
|
|
|
2354
2367
|
return m.mock(target, methodName, expectedInvocations, expectedArgs, returnValue, allowNonExistingMethods)
|
|
2355
2368
|
catch error
|
|
2356
2369
|
'bs:disable-next-line
|
|
2357
|
-
m.
|
|
2370
|
+
m.fail("Setting up mock failed: " + error.message, "", "", true)
|
|
2358
2371
|
end try
|
|
2359
2372
|
return false
|
|
2360
2373
|
end function
|
|
@@ -2714,7 +2727,7 @@ namespace rooibos
|
|
|
2714
2727
|
if m.currentResult.isFail
|
|
2715
2728
|
return false
|
|
2716
2729
|
end if
|
|
2717
|
-
m.
|
|
2730
|
+
m.fail("mock failure on '" + methodName + "' : " + message, "", "", true)
|
|
2718
2731
|
return false
|
|
2719
2732
|
end function
|
|
2720
2733
|
|
|
@@ -3106,12 +3119,12 @@ namespace rooibos
|
|
|
3106
3119
|
return false
|
|
3107
3120
|
end if
|
|
3108
3121
|
if target = invalid
|
|
3109
|
-
m.fail("Target was invalid")
|
|
3122
|
+
m.fail("Target was invalid", "", "", true)
|
|
3110
3123
|
end if
|
|
3111
3124
|
|
|
3112
3125
|
result = m.waitForField(target, fieldName, delay, maxAttempts)
|
|
3113
3126
|
if not result
|
|
3114
|
-
return m.fail("Timeout waiting for targetField " + fieldName + " to be set on target")
|
|
3127
|
+
return m.fail("Timeout waiting for targetField " + fieldName + " to be set on target", "", "", true)
|
|
3115
3128
|
end if
|
|
3116
3129
|
|
|
3117
3130
|
return true
|