-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
test-audit.xml
1059 lines (1050 loc) · 43 KB
/
test-audit.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="UTF-8"?>
<specification xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://jboss.com/products/weld/org.javamoney.tck/audit"
xsi:schemaLocation="http://jboss.com/products/weld/org.javamoney.tck/audit"
name="JSR 354 Money and Currency" version="1.0.0" id="JSR 354"
generateSectionIds="false">
<section id="0" title="TCK Setup">
<!-- Tests class TCKSetupTest -->
<group>
<text>Tests the correct setup of the TCK</text>
<assertion id="Setup">
<text>Ensure an implementation of
org.javamoney.tck.JSR354TestConfiguration is registered using the
java.util.ServiceLoader.
</text>
</assertion>
</group>
</section>
<section id="1" title="Introduction, Use Cases, Requirements (no tests)"/>
<section id="2" title="Use Cases"/>
<section id="3" title="Requirements"/>
<section id="3.1" title="Core Requirements"/>
<section id="3.2" title="Formatting Requirements"/>
<section id="3.3" title="EE and ME Support"/>
<section id="3.4" title="Non Functional Requirements"/>
<section id="4" title="Specification"/>
<!-- **************************************************************** ****
Core API **************************************************************** -->
<section id="4.1" title="Package and Project Structure"/>
<section id="4.1.1" title="Package Overview"/>
<section id="4.1.2" title="Module/Repository Overview"/>
<section id="4.2" title="Money and Currency Core API"/>
<section id="4.2.1" title="Modelling of Currencies">
<!-- Tests class ModellingCurrenciesTest -->
<group>
<text>A. Managing the Currency code</text>
<assertion id="421-A1">
<text>Ensure at least one javax.money.CurrencyUnit implementation
is
available and registered/accessible from Monetary.
</text>
</assertion>
<assertion id="421-A2">
<text>Test that currencies returned for same ISO currency code are
equal, ensure when listing all available currencies, that the
code
is unique.
</text>
</assertion>
<assertion id="421-A3">
<text>Ensure all ISO 3-letters codes as defined by the JDK are also
available from Monetary.
</text>
</assertion>
<assertion id="421-A4">
<text>Test that JDK currencies returned
match the values of
corresponding JDK Currency (code, numeric code,
default fraction
digits).
</text>
</assertion>
</group>
<group>
<text>B. Currency Unit Implementation Requirements</text>
<assertion id="421-B1">
<text>CurrencyUnit must implement hashCode.
</text>
</assertion>
<assertion id="421-B2">
<text>CurrencyUnit must implement equals.
</text>
</assertion>
<assertion id="421-B3">
<text>CurrencyUnit implementation must be Comparable.
</text>
</assertion>
<assertion id="421-B4">
<text>CurrencyUnit implementation must be immutable.
</text>
</assertion>
<assertion id="421-B5" testable="false">
<text>CurrencyUnit implementation must be thread safe.
</text>
</assertion>
<assertion id="421-B6">
<text>CurrencyUnit implementation must be serializable.
</text>
</assertion>
</group>
</section>
<section id="4.2.2" title="Modeling of Monetary Amounts">
<!-- Tests class ModellingMonetaryTest -->
<group>
<text>Preconditions</text>
<assertion id="422-0">
<text>Ensure at least one javax.money.MonetaryAmount
implementation
is registered, by calling Monetary.getAmountTypes();
</text>
</assertion>
</group>
<!-- Test the following tests for each type registered. Use MonetaryAmountFactory
to of instances to be compared. -->
<group>
<text>A. Data Interoperability</text>
<assertion id="422-A1">
<text>For each MonetaryAmount implementation: Ensure getCurrencyCode
returns correct results.
</text>
</assertion>
<assertion id="422-A2">
<text>For each MonetaryAmount implementation: Ensure getNumber()
returns correct results.
</text>
</assertion>
<assertion id="422-A3">
<text>For each MonetaryAmount implementation: Ensure
getMonetaryContext() returns correct results.
</text>
</assertion>
<assertion id="422-A4">
<text>For each MonetaryAmount implementation: Ensure isNegative()
returns correct results.
</text>
</assertion>
<assertion id="422-A5">
<text>For each MonetaryAmount implementation: Ensure isPositive()
returns correct results.
</text>
</assertion>
<assertion id="422-A6">
<text>For each MonetaryAmount implementation: Ensure isZero()
returns correct results (-0, +0 == 0).
</text>
</assertion>
<assertion id="422-A7">
<text>For each MonetaryAmount implementation: signum() function is
implemented correctly.
</text>
</assertion>
<assertion id="422-A8">
<text>For each MonetaryAmount implementation: Ensure isNegativeOrZero()
returns correct results.
</text>
</assertion>
<assertion id="422-A9">
<text>For each MonetaryAmount implementation: Ensure isPositiveOrZero()
returns correct results.
</text>
</assertion>
</group>
<group>
<text>B. Prototyping Support</text>
<assertion id="422-B1">
<text>Ensure getFactory returns a MonetaryAmountFactory and that
instances created are of the same type.
</text>
</assertion>
<assertion id="422-B2">
<text>Call getFactory(), create a new MonetaryAmount instance, with
same input. The instances must
be equal (or even be identical!).
</text>
</assertion>
<assertion id="422-B3">
<text>Call getFactory(), create a new MonetaryAmount instance with a
new number
value. The instances must
be non equal and have the
according
numeric value.
</text>
</assertion>
<assertion id="422-B4">
<text>Call getFactory(), create a new MonetaryAmount instance with a
new currency
value. The instances must
be non equal and have the
according
currency value. Do this by code and by passing a
CurrencyUnit.
</text>
</assertion>
<assertion id="422-B5">
<text>Call getFactory(), create a new MonetaryAmount instance with a
new monetary
context (if possible - check the max context).
The
instances must
be
non equal and have the
same currency and
number
value.
</text>
</assertion>
<assertion id="422-B6">
<text>Call getFactory(), create a new MonetaryAmount instance with a
new monetary
context, a new number and a new currency.
The instances
must be non
equal.
</text>
</assertion>
</group>
<group>
<text>C. Comparison Methods</text>
<assertion id="422-C1">
<text>The isGreaterThan() implemented correctly.</text>
</assertion>
<assertion id="422-C2">
<text>The isGreaterThanOrEqals() implemented correctly, regardless
of trailing zeroes.
</text>
</assertion>
<assertion id="422-C3">
<text>The isLessThan() implemented correctly.</text>
</assertion>
<assertion id="422-C4">
<text>The isLessThanOrEqals() implemented correctly, regardless of
trailing zeroes.
</text>
</assertion>
<assertion id="422-C5">
<text>For two amounts with same numeric value and currency:
isEqualTo() return true, regardless of trailing zeroes.
</text>
</assertion>
<assertion id="422-C6">
<text>For two amounts with same numeric value and currency:
isEqualTo() return true, regardless of MonetaryContext.
</text>
</assertion>
<assertion id="422-C7">
<text>For two amounts with same numeric value and currency:
isEqualTo() return true, regardless of Implementation Type.
</text>
</assertion>
</group>
<group>
<text>D. Basic Arithmetic Operations</text>
<assertion id="422-D1">
<text>Tests that add() correctly adds two values.
</text>
</assertion>
<assertion id="422-D2">
<text>Tests that add() with non matching currencies throws a
MonetaryException.
</text>
</assertion>
<assertion id="422-D3">
<text>Tests that add(0) should return itself.
</text>
</assertion>
<assertion id="422-D4">
<text>Tests that add() which results in an amount exceeding the max
MonetaryContext throws a MonetaryException.
</text>
</assertion>
<assertion id="422-D5">
<text>Tests that add(null) throws an NullPointerException.
</text>
</assertion>
<assertion id="422-D6">
<text>subtract() must subtract a value from another.
</text>
</assertion>
<assertion id="422-D7">
<text>subtract(0) should return itself.
</text>
</assertion>
<assertion id="422-D8">
<text>subtract() with non matching currencies must
throw a
MonetaryException.
</text>
</assertion>
<assertion id="422-D9">
<text>subtract() which results in an amount exceeding the max
MonetaryContext must throw a
MonetaryException.
</text>
</assertion>
<assertion id="422-D10">
<text>subtract(null) must throw an NullPointerException.
</text>
</assertion>
<assertion id="422-D11">
<text>multiply() allow to multiply numbers.
</text>
</assertion>
<assertion id="422-D12">
<text>multiply(1) should return itself.
</text>
</assertion>
<assertion id="422-D13">
<text>multiply() which results in an amount exceeding the max
MonetaryContext must throw a
MonetaryException.
</text>
</assertion>
<assertion id="422-D14">
<text>multiply(null) must throw an NullPointerException.
</text>
</assertion>
<assertion id="422-D15">
<text>divide() function allow to divide numbers.
</text>
</assertion>
<assertion id="422-D16">
<text>divide(0) function must throw an
ArithmeticException.
</text>
</assertion>
<assertion id="422-D17">
<text>divide(1) should return itself.
</text>
</assertion>
<assertion id="422-D18">
<text>divide(null) must throw an NullPointerException.
</text>
</assertion>
<assertion id="422-D19">
<text>remainder() allow to calculate the remainder.
</text>
</assertion>
<assertion id="422-D20">
<text>remainder(0) must throw an ArithmeticException.
</text>
</assertion>
<assertion id="422-D21">
<text>remainder(null) must throw an NullPointerException.
</text>
</assertion>
<assertion id="422-D22">
<text>divideAndRemainder() allow to divide/remind
numbers.
</text>
</assertion>
<assertion id="422-D23">
<text>divideAndRemainder(0) must throw an ArithmeticException.
</text>
</assertion>
<assertion id="422-D24">
<text>divideAndRemainder(null) must throw an NullPointerException.
</text>
</assertion>
<assertion id="422-D25">
<text>divideAndRemainder(1) must retzrn -8itself, 0).
</text>
</assertion>
<assertion id="422-D26">
<text>scaleByPowerOfTen() allow to scale by power of
10.
</text>
</assertion>
<assertion id="422-D27">
<text>abs() allow to calculate the absolute value.
</text>
</assertion>
<assertion id="422-D28">
<text>negate() function allow to negate the value.
</text>
</assertion>
</group>
<group>
<text>E. Functional Extension Points</text>
<assertion id="422-E1">
<text>Ensure with(MonetaryOperator) can be called and produces
amounts of the same type and correct value.
</text>
</assertion>
<assertion id="422-E2">
<text>When an invalid operator is passed (throwing any exception),
a
MonetaryException must be thrown. When null is passed, an NPE
must
be thrown.
</text>
</assertion>
<assertion id="422-E3">
<text>Ensure query(MonetaryQUery) can be called and produces
valuable results.
</text>
</assertion>
<assertion id="422-E4">
<text>When an invalid query is passed (throwing any exception), a
MonetaryException must be thrown. When null is passed, an NPE must
be thrown.
</text>
</assertion>
</group>
<group>
<text>F. Monetary Amount Implementation Requirements</text>
<assertion id="422-F1">
<text>Implementations of MonetaryAmount must implement hashCode,
considering number, currency and implementation type,
monetary
context.
</text>
</assertion>
<assertion id="422-F2">
<text>Implementations of MonetaryAmount must implement
equals,
considering number, currency and implementation type,
monetary
context.
</text>
</assertion>
<assertion id="422-F3">
<text>Implementations of MonetaryAmount must be Comparable.
</text>
</assertion>
<assertion id="422-F4">
<text>Implementations of MonetaryAmount must be immutable.
</text>
</assertion>
<assertion id="422-F5" testable="false">
<text>Implementations of MonetaryAmount should be thread-safe.
</text>
</assertion>
</group>
</section>
<section id="4.2.3" title="Externalizing the Numeric Value of an Amount">
<group>
<text>A. Testing Numeric Externalization for positive values</text>
<assertion id="423-A1">
<text>Checks if number type is not null and returning a concrete (no
abstract class or interface).
</text>
</assertion>
<assertion id="423-A2">
<text>Check if a correct integer value is returned, no truncation is
allowed to be performed.
</text>
</assertion>
<assertion id="423-A3">
<text>Check if a correct long value is returned, no truncation is
allowed to be performed.
</text>
</assertion>
<assertion id="423-A4">
<text>Check if a correct double value is returned, no truncation is
allowed to be performed.
</text>
</assertion>
<assertion id="423-A5">
<text>Check if a correct number value is returned, no truncation is
allowed to be performed.
Check should be done for every JDK type
supported.
</text>
</assertion>
<assertion id="423-A6">
<text>Check if a correct integer value is returned, truncation is
allowed to be performed.
</text>
</assertion>
<assertion id="423-A7">
<text>Check if a correct long value is returned, truncation is
allowed to be performed.
</text>
</assertion>
<assertion id="423-A8">
<text>Check if a correct double value is returned, truncation is
allowed to be performed.
</text>
</assertion>
<assertion id="423-A9">
<text>Check if a correct number value is returned, truncation is
allowed to be performed.
Check should be done for every JDK type
supported.
</text>
</assertion>
<assertion id="423-A10">
<text>Test correct precision values, including border cases.
</text>
</assertion>
<assertion id="423-A11">
<text>Test correct scale values, including border cases.
</text>
</assertion>
</group>
<group>
<text>B. Testing Numeric Externalization for negative values</text>
<assertion id="423-B1">
<text>Checks if number type is not null and returning a concrete (no
abstract class or interface).
</text>
</assertion>
<assertion id="423-B2">
<text>Check if a correct integer value is returned, no truncation is
allowed to be performed.
</text>
</assertion>
<assertion id="423-B3">
<text>Check if a correct long value is returned, no truncation is
allowed to be performed.
</text>
</assertion>
<assertion id="423-B4">
<text>Check if a correct double value is returned, no truncation is
allowed to be performed.
</text>
</assertion>
<assertion id="423-B5">
<text>Check if a correct number value is returned, no truncation is
allowed to be performed.
Check should be done for every JDK type
supported.
</text>
</assertion>
<assertion id="423-B6">
<text>Check if a correct integer value is returned, truncation is
allowed to be performed.
</text>
</assertion>
<assertion id="423-B7">
<text>Check if a correct long value is returned, truncation is
allowed to be performed.
</text>
</assertion>
<assertion id="423-B8">
<text>Check if a correct double value is returned, truncation is
allowed to be performed.
</text>
</assertion>
<assertion id="423-B9">
<text>Check if a correct number value is returned, truncation is
allowed to be performed.
Check should be done for every JDK type
supported.
</text>
</assertion>
<assertion id="423-B10">
<text>Test correct precision values, including border cases.
</text>
</assertion>
<assertion id="423-B11">
<text>Test correct scale values, including border cases.
</text>
</assertion>
</group>
<group>
<text>C. Testing Numeric Externalization for zero values</text>
<assertion id="423-C1">
<text>Checks if number type is not null and returning a concrete (no
abstract class or interface).
</text>
</assertion>
<assertion id="423-C2">
<text>Check if a correct integer value is returned, no truncation is
allowed to be performed.
</text>
</assertion>
<assertion id="423-C3">
<text>Check if a correct long value is returned, no truncation is
allowed to be performed.
</text>
</assertion>
<assertion id="423-C4">
<text>Check if a correct number value is returned, no truncation is
allowed to be performed. Check should be done for every JDK type
supported.
</text>
</assertion>
<assertion id="423-C5">
<text>Check if a correct integer value is returned, truncation is
allowed to be performed (but is not necessary).
</text>
</assertion>
<assertion id="423-C6">
<text>Check if a correct long value is returned, truncation is
allowed to be performed (but is not necessary).
</text>
</assertion>
<assertion id="423-C7">
<text>Check if a correct double value is returned, truncation is
allowed to be performed (but is not necessary).
</text>
</assertion>
<assertion id="423-C8">
<text>Check if a correct number value is returned, truncation is
allowed to be performed (but is not necessary).
Check should be done
for every JDK type
supported.
</text>
</assertion>
<assertion id="423-C9">
<text>Test correct precision values, including border cases.
</text>
</assertion>
<assertion id="423-C10">
<text>Test correct scale values, including border cases.
</text>
</assertion>
</group>
</section>
<section id="4.2.4" title="Functional Extension Points">
<group>
<text>A. Monetary Operator Implementation Requirements</text>
<assertion id="424-A1">
<text>The return type of apply must be the same type as the
parameter
(amount.getClass() == result.getClass()).
</text>
</assertion>
</group>
</section>
<section id="4.2.5" title="The Monetary Context">
<!-- No tests, class is part of API! -->
</section>
<!-- Theses tests must be done for every amount type registered. Factories
must be accessed first using Monetary singleton, then from a created
amount. -->
<section id="4.2.6" title="Creating Monetary Amount Instances">
<group>
<text>A. Accessing MonetaryAmount Factories</text>
<assertion id="426-A1">
<text>Access a MonetaryAmountFactory for each registered type.
</text>
</assertion>
<assertion id="426-A2">
<text>Checks if getAmountType returns the correct type.</text>
</assertion>
<assertion id="426-A3">
<text>Checks for default and max MonetaryContext.</text>
</assertion>
<assertion id="426-A4">
<text>Checks if capabilities of default MonetaryContext are less
than Max
MonetaryContext.
</text>
</assertion>
</group>
<group>
<text>B. Testing Creation of Amounts with zero values</text>
<assertion id="426-B1">
<text>For each MonetaryAmount Factory: Create zero amounts from a
factory with currencies.
</text>
</assertion>
<assertion id="426-B2">
<text>For each MonetaryAmount Factory: Create zero amounts from a
factory with monetary contexts.
</text>
</assertion>
<assertion id="426-B3">
<text>For each MonetaryAmount Factory: Bad Case: Create zero amounts
from a factory with an invalid currency.
</text>
</assertion>
<assertion id="426-B4">
<text>For each MonetaryAmount Factory: Bad Case: Create zero amounts
from a factory with an invalid MonetaryContext.
</text>
</assertion>
</group>
<group>
<text>C. Testing Creation of Amounts with positive values</text>
<assertion id="426-C1">
<text>For each MonetaryAmount Factory: Create positive amounts from
a factory with currencies.
</text>
</assertion>
<assertion id="426-C2">
<text>For each MonetaryAmount Factory: Create positive amounts from
a factory with monetary contexts.
</text>
</assertion>
<assertion id="426-C3">
<text>For each MonetaryAmount Factory: Bad Case: Create positive
amounts from a factory with an invalid numeric value (exceeding max
MonetaryContext).
</text>
</assertion>
<assertion id="426-C4">
<text>For each MonetaryAmount Factory: Bad Case: Create positive
amounts from a factory with an invalid currency.
</text>
</assertion>
<assertion id="426-C5">
<text>For each MonetaryAmount Factory: Bad Case: Create positive
amounts from a factory with an invalid MonetaryContext.
</text>
</assertion>
</group>
<group>
<text>D. Testing Creation of Amounts with negative values</text>
<assertion id="426-D1">
<text>For each MonetaryAmount Factory: Create negative amounts from
a factory with currencies.
</text>
</assertion>
<assertion id="426-D2">
<text>For each MonetaryAmount Factory: Create negative amounts from
a factory with monetary contexts.
</text>
</assertion>
<assertion id="426-D3">
<text>For each MonetaryAmount Factory: Bad Case: Create negative
amounts from a factory with an invalid numeric value (exceeding max
MonetaryContext).
</text>
</assertion>
<assertion id="426-D4">
<text>For each MonetaryAmount Factory: Bad Case: Create negative
amounts from a factory with an invalid currency.
</text>
</assertion>
<assertion id="426-D5">
<text>For each MonetaryAmount Factory: Bad Case: Create negative
amounts from a factory with an invalid MonetaryContext.
</text>
</assertion>
</group>
</section>
<section id="4.2.7" title="Accessing Currencies, Amounts and Roundings">
<group>
<text>A. Accessing Currencies</text>
<assertion id="427-A1">
<text>Test if Monetary provides all ISO related entries,
similar to the JDK.
</text>
</assertion>
<assertion id="427-A2">
<text>Test if Monetary provides all Locale related
entries, similar to the JDK.
</text>
</assertion>
<assertion id="427-A3">
<text>Test if Monetary provides correct check for ISO
codes.
</text>
</assertion>
<assertion id="427-A4">
<text>Test if Monetary provides correct check for
Locales.
</text>
</assertion>
<assertion id="427-A5">
<text>Test for custom Monetary provided, based on the TCK
TestProvider.
</text>
</assertion>
</group>
<group>
<text>B. Accessing Monetary Amount Factories</text>
<assertion id="427-B1">
<text>Ensure the types available, must be at least one type.</text>
</assertion>
<assertion id="427-B2">
<text>Ensure amount factories are accessible for all types
available,
providing also the
some test implementations with the
TCK.
</text>
</assertion>
<assertion id="427-B3">
<text>Ensure amount factories are accessible for all types
available,
providing also the
some test implementations with the
TCK,
and that
every factory accessed
is a new instance.
</text>
</assertion>
<assertion id="427-B4">
<text>Ensure correct query function implementations, providing also
the
some test implementations with the TCK.
</text>
</assertion>
<assertion id="427-B5">
<text>Ensure a default factory is returned. Test javamoney.config
for
configuring default value.
</text>
</assertion>
</group>
<group>
<text>C. Accessing Roundings</text>
<assertion id="427-C1">
<text>Access roundings using all defined currencies, including TCK
custom currencies.
</text>
</assertion>
<assertion id="427-C2">
<text>Access roundings using a MonetaryContext. Use different
MathContext/RoundingMode, as an attribute, when running
on the JDK.
</text>
</assertion>
<assertion id="427-C3">
<text>Access custom roundings and ensure TCK custom roundings are
registered.
</text>
</assertion>
<assertion id="427-C4">
<text>Test TCK custom roundings.
</text>
</assertion>
</group>
</section>
<section id="4.2.8" title="Additional Functional Support"/>
<section id="4.2.9" title="Exception Types"/>
<section id="4.3" title="Currency Conversion"/>
<section id="4.3.1" title="Accessing Monetary Conversions">
<group>
<text>A. Test Basic MonetaryConversions Accessors
</text>
<assertion id="431-A1">
<text>Ensure at least one conversion provider is accessible.</text>
</assertion>
<assertion id="431-A2">
<text>Access and test different Currency Conversions for the provider in place.</text>
</assertion>
<assertion id="431-A3">
<text>Access and test the provider's meta data.</text>
</assertion>
<assertion id="431-A4">
<text>Access the default provider chain (must be defined).</text>
</assertion>
<assertion id="431-A5">
<text>Access and test conversion using the default provider chain.</text>
</assertion>
<assertion id="431-A6">
<text>Bad case: Test access of an inexistent provider.</text>
</assertion>
<assertion id="431-A7">
<text>Bad case: Test inclusion of an inexistent provider in a provider chain.</text>
</assertion>
</group>
</section>
<section id="4.3.2" title="Converting Amounts">
<group>
<text>A. Test Basic MonetaryConversions Accessors
</text>
<assertion id="432-A1">
<text>Test successful conversion for possible currency pairs.</text>
</assertion>
<assertion id="432-A2">
<text>Compare conversions done with exchange rates provided for same conversion.</text>
</assertion>
<assertion id="432-A3">
<text>Bad case: try converting from/to an inconvertible (custom) currency, ensure
CurrencyConversionException is thrown.
</text>
</assertion>
<assertion id="432-A4">
<text>Bad case: try converting from/to a null currency, ensure CurrencyConversionException is thrown.
</text>
</assertion>
</group>
</section>
<section id="4.3.3" title="Exchange Rates and Rate Providers">
<group>
<text>A. Test Basic MonetaryConversions Accessors
</text>
<assertion id="433-A1">
<text>Test access to conversion rates.</text>
</assertion>
<assertion id="433-A2">
<text>Ensure additional ConversionContext is passed correctly to SPIs.</text>
</assertion>
<assertion id="433-A3">
<text>Bad case: try accessing rates with incosistent data.</text>
</assertion>
</group>
</section>
<section id="4.3.4" title="ExchangeRateProvider Chains">
<group>
<text>A. Test Basic MonetaryConversions Accessors
</text>
<assertion id="434-A1">
<text>Test correct rate evaluation for different provider chains, providers defined by the TCK.</text>
</assertion>
<assertion id="434-A2">
<text>Test correct rate evaluation for different provider chains, providers defined by the TCK, with
historic rates.
</text>
</assertion>
<assertion id="434-A3">
<text>Test availability of providers defined by the TCK.</text>
</assertion>
</group>
</section>
<section id="4.4" title="Money and Currency Formatting API"/>
<section id="4.4.1" title="Formatting of Monetary Amounts">
<group>
<text>A. Test all concrete MonetaryAmountFormat Implementations
</text>
<assertion id="441-A1">
<text>Format several amounts, created using the default factory,
but
also a test instance, provided by the TCK, to ensure no
implementation
dependencies on the implementation.
</text>
</assertion>
<assertion id="441-A2">
<text>Print several amounts, created using the default factory, but
also a test instance, provided by the TCK, to ensure no
implementation
dependencies on the implementation.
</text>
</assertion>
<assertion id="441-A3">
<text>Parse back several amounts, input created using the
formatting
from 'Format_formatAmounts'.
</text>
</assertion>
<assertion id="441-A4">
<text>Get/set default currency, try to parse patterns without
currency information.
</text>
</assertion>
</group>
</section>
<section id="4.4.2" title="Configuring a Monetary Amount Formatter">
<assertion id="442-A1">
<text>Get/set different amount styles (especially patterns, group
sizes, group characters) and compare results with results as from
RI.
Also apply patterns without currency invovled.
</text>
</assertion>
</section>
<section id="4.4.3" title="MonetaryFormats Accessor Singleton">
<group>
<text>B. Accessing Monetary Amount Formats</text>
<assertion id="443-A1">
<text>AccessingMonetaryAmountFormat using
MonetaryFormats.getAmountFormat(Locale locale), all locales
available also from java.text.DecimalFormat must be supported.
</text>
</assertion>
<assertion id="443-A2">
<text>AccessingMonetaryAmountFormat using
MonetaryFormats.getAmountFormat(AmountStyle style), all locales
available also from java.text.DecimalFormat must be supported
(using AmountStyle.of(Locale)).
</text>
</assertion>
<assertion id="443-A3">
<text>Test
MonetaryFormats.getAvailableLocales, all locales
available
also from java.text.DecimalFormat must be supported
(using
AmountStyle.of(Locale)), more locales are possible.
</text>
</assertion>
</group>
</section>
<section id="4.4.4" title="Formatting Exceptions"/>
<section id="4.5" title="Money and Currency SPI"/>
<section id="4.5.1" title="Core SPI">
<group>
<text>A. Registering Currencies</text>
<assertion id="451-A1">
<text>Test registered CurrencyProviderSpi (at least one instance
required). Test behaviour,
especially bad case behaviour for invalid
input.
</text>
</assertion>
<assertion id="451-A2">
<text>Test registered MonetarySingletonSpi (at least one instance
required). Test behaviour, especially bad case behaviour for invalid
input.
</text>
</assertion>
</group>
<group>
<text>B. Registering Monetary Amount Factories</text>
<assertion id="451-B1">
<text>Test registered MonetarySpi (at least one instance
required). Test behaviour,
especially bad case behaviour for invalid
input.
</text>
</assertion>
</group>
<group>
<text>C. Backing the Monetary Singleton</text>