JSR 354 Money and Currency TCK Coverage
1.0.0
Contents
Coverage Distribution
Chapter Summary
Section Summary
Coverage Detail
Colour Key |
Assertion is covered |
Assertion is not covered |
Assertion test is unimplemented |
Assertion is untestable |
Tests the correct setup of the TCK
Setup)
Ensure an implementation of
org.javamoney.tck.JSR354TestConfiguration is registered using the
java.util.ServiceLoader.
org.javamoney.tck.tests
TCKSetupTest.testTestSetup()
TCKSetupTest.testTestAmountConfiguration()
A. Managing the Currency code
421-A1)
Ensure at least one javax.money.CurrencyUnit implementation
is
available and registered/accessible from Monetary.
org.javamoney.tck.tests
ModellingCurrenciesTest.testEnsureCurrencyUnit()
421-A2)
Test that currencies returned for same ISO currency code are
equal, ensure when listing all available currencies, that the
code
is unique.
org.javamoney.tck.tests
ModellingCurrenciesTest.testEqualISOCurrencies()
421-A3)
Ensure all ISO 3-letters codes as defined by the JDK are also
available from Monetary.
org.javamoney.tck.tests
ModellingCurrenciesTest.testEnforce3LetterCode4ISO()
421-A4)
Test that JDK currencies returned
match the values of
corresponding JDK Currency (code, numeric code,
default fraction
digits).
org.javamoney.tck.tests
ModellingCurrenciesTest.testISOCodes()
B. Currency Unit Implementation Requirements
421-B1)
CurrencyUnit must implement hashCode.
org.javamoney.tck.tests
ModellingCurrenciesTest.testCurrencyClassesEqualsHashcode()
421-B2)
CurrencyUnit must implement equals.
org.javamoney.tck.tests
ModellingCurrenciesTest.testImplementsEquals()
421-B3)
CurrencyUnit implementation must be Comparable.
org.javamoney.tck.tests
ModellingCurrenciesTest.testCurrencyClassesComparable()
421-B4)
CurrencyUnit implementation must be immutable.
org.javamoney.tck.tests
ModellingCurrenciesTest.testIsImmutable()
421-B5)
CurrencyUnit implementation must be thread safe.
421-B6)
CurrencyUnit implementation must be serializable.
org.javamoney.tck.tests
ModellingCurrenciesTest.testImplementsSerializable()
Preconditions
422-0)
Ensure at least one javax.money.MonetaryAmount
implementation
is registered, by calling Monetary.getAmountTypes();
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testEnsureMonetaryAmount()
A. Data Interoperability
422-A1)
For each MonetaryAmount implementation: Ensure getCurrencyCode
returns correct results.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testCurrencyCode()
422-A2)
For each MonetaryAmount implementation: Ensure getNumber()
returns correct results.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testGetNumber()
422-A3)
For each MonetaryAmount implementation: Ensure
getMonetaryContext() returns correct results.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testGetMonetaryContext()
422-A4)
For each MonetaryAmount implementation: Ensure isNegative()
returns correct results.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testIsNegative()
422-A5)
For each MonetaryAmount implementation: Ensure isPositive()
returns correct results.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testIsPositive()
422-A6)
For each MonetaryAmount implementation: Ensure isZero()
returns correct results (-0, +0 == 0).
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testIsZero()
ModellingMonetaryAmountsTest.testIsZeroAdvanced()
422-A7)
For each MonetaryAmount implementation: signum() function is
implemented correctly.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testSignum()
422-A8)
For each MonetaryAmount implementation: Ensure isNegativeOrZero()
returns correct results.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testIsNegativeOrZero()
422-A9)
For each MonetaryAmount implementation: Ensure isPositiveOrZero()
returns correct results.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testIsPositiveOrZero()
B. Prototyping Support
422-B1)
Ensure getFactory returns a MonetaryAmountFactory and that
instances created are of the same type.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testMonetaryAmountFactories()
422-B2)
Call getFactory(), create a new MonetaryAmount instance, with
same input. The instances must
be equal (or even be identical!).
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testMonetaryAmountFactories_InstancesMustBeEqual()
422-B3)
Call getFactory(), create a new MonetaryAmount instance with a
new number
value. The instances must
be non equal and have the
according
numeric value.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testMonetaryAmountFactories_InstantesMustBeNotEqual()
422-B4)
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.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testMonetaryAmountFactories_CreateWithCurrencies()
422-B5)
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.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testMonetaryAmountFactories_CreateWithMonetaryContext()
422-B6)
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.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testMonetaryAmountFactories_CreateWithMonetaryContextNumberAndCurrency()
C. Comparison Methods
422-C1)
The isGreaterThan() implemented correctly.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testMonetaryAmount_isGreaterThan()
422-C2)
The isGreaterThanOrEqals() implemented correctly, regardless
of trailing zeroes.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testMonetaryAmount_isGreaterThanOrEquals()
422-C3)
The isLessThan() implemented correctly.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testMonetaryAmount_isLessThan()
422-C4)
The isLessThanOrEqals() implemented correctly, regardless of
trailing zeroes.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testMonetaryAmount_isLessThanOrEqualTo()
422-C5)
For two amounts with same numeric value and currency:
isEqualTo() return true, regardless of trailing zeroes.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testMonetaryAmount_isEqualTo()
422-C6)
For two amounts with same numeric value and currency:
isEqualTo() return true, regardless of MonetaryContext.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testMonetaryAmount_isEqualToRegardlessMonetaryContext()
422-C7)
For two amounts with same numeric value and currency:
isEqualTo() return true, regardless of Implementation Type.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testMonetaryAmount_isEqualToRegardlessType()
D. Basic Arithmetic Operations
422-D1)
Tests that add() correctly adds two values.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testAddPositiveIntegers()
ModellingMonetaryAmountsTest.testAddNegativeIntegers()
ModellingMonetaryAmountsTest.testAddPositiveFractions()
ModellingMonetaryAmountsTest.testAddMixedIntegers()
ModellingMonetaryAmountsTest.testAddMixedFractions()
422-D2)
Tests that add() with non matching currencies throws a
MonetaryException.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testAdd_IncompatibleCurrencies()
422-D3)
Tests that add(0) should return itself.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testAdd_Zero()
422-D4)
Tests that add() which results in an amount exceeding the max
MonetaryContext throws a MonetaryException.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testAdd_ExceedsCapabilities()
422-D5)
Tests that add(null) throws an NullPointerException.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testAdd_Null()
422-D6)
subtract() must subtract a value from another.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testSubtractPositiveIntegers()
ModellingMonetaryAmountsTest.testSubtractNegativeIntegers()
ModellingMonetaryAmountsTest.testSubtractPositiveFractions()
ModellingMonetaryAmountsTest.testSubtractMixedIntegers()
ModellingMonetaryAmountsTest.testSubtractMixedFractions()
422-D7)
subtract(0) should return itself.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testSubtract_Zero()
422-D8)
subtract() with non matching currencies must
throw a
MonetaryException.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testSubtract_IncompatibleCurrencies()
422-D9)
subtract() which results in an amount exceeding the max
MonetaryContext must throw a
MonetaryException.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testSubtract_ExceedsCapabilities()
422-D10)
subtract(null) must throw an NullPointerException.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testSubtract_Null()
422-D11)
multiply() allow to multiply numbers.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testMultiply_Integral()
ModellingMonetaryAmountsTest.testMultiply_Decimals()
422-D12)
multiply(1) should return itself.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testMultiplyOne()
422-D13)
multiply() which results in an amount exceeding the max
MonetaryContext must throw a
MonetaryException.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testMultiplyExceedsCapabilities()
422-D14)
multiply(null) must throw an NullPointerException.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testMultiplyNull()
ModellingMonetaryAmountsTest.testMultiply_DoubleNaN()
ModellingMonetaryAmountsTest.testMultiply_DoublePOSITIVE_INFINITY()
ModellingMonetaryAmountsTest.testMultiply_DoubleNEGATIVE_INFINITY()
422-D15)
divide() function allow to divide numbers.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testDivide()
ModellingMonetaryAmountsTest.testDivideToIntegralValue()
422-D16)
divide(0) function must throw an
ArithmeticException.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testDivideZero()
ModellingMonetaryAmountsTest.testDivideDoubleNaN()
ModellingMonetaryAmountsTest.testDivideDoublePOSITIVE_INFINITY()
ModellingMonetaryAmountsTest.testDivideDoubleNEGATIVE_INFINITY()
422-D17)
divide(1) should return itself.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testDivideOne()
422-D18)
divide(null) must throw an NullPointerException.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testDivideNull()
422-D19)
remainder() allow to calculate the remainder.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testRemainder()
422-D20)
remainder(0) must throw an ArithmeticException.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testRemainderZero_Double()
ModellingMonetaryAmountsTest.testRemainderZero_Long()
ModellingMonetaryAmountsTest.testRemainderZero_Number()
422-D21)
remainder(null) must throw an NullPointerException.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testRemainderNull()
ModellingMonetaryAmountsTest.testRemainder_DoubleNaN()
ModellingMonetaryAmountsTest.testRemainder_DoublePOSITIVE_INFINITY()
ModellingMonetaryAmountsTest.testRemainder_DoubleNEGATIVE_INFINITY()
422-D22)
divideAndRemainder() allow to divide/remind
numbers.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testDivideAndRemainder()
422-D23)
divideAndRemainder(0) must throw an ArithmeticException.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testDivideAndRemainderZero()
422-D24)
divideAndRemainder(null) must throw an NullPointerException.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testDivideAndRemainderNull()
ModellingMonetaryAmountsTest.testDivideAndRemainderDoubleNaN()
ModellingMonetaryAmountsTest.testDivideAndRemainderDoublePOSITIVE_INFINITY()
ModellingMonetaryAmountsTest.testDivideAndRemainderDoubleNEGATIVE_INFINITY()
422-D25)
divideAndRemainder(1) must retzrn -8itself, 0).
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testDivideAndRemainderOne()
422-D26)
scaleByPowerOfTen() allow to scale by power of
10.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testScaleByPowerOfTen()
422-D27)
abs() allow to calculate the absolute value.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testAbsolute()
422-D28)
negate() function allow to negate the value.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testNegate()
E. Functional Extension Points
422-E1)
Ensure with(MonetaryOperator) can be called and produces
amounts of the same type and correct value.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testWith()
ModellingMonetaryAmountsTest.testWith4ProvidedOperators()
422-E2)
When an invalid operator is passed (throwing any exception),
a
MonetaryException must be thrown. When null is passed, an NPE
must
be thrown.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testWithInvalidOperator()
ModellingMonetaryAmountsTest.testWithNull()
ModellingMonetaryAmountsTest.testWithNull4ProvidedOperators()
422-E3)
Ensure query(MonetaryQUery) can be called and produces
valuable results.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testQuery()
422-E4)
When an invalid query is passed (throwing any exception), a
MonetaryException must be thrown. When null is passed, an NPE must
be thrown.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testQueryInvalidQuery()
ModellingMonetaryAmountsTest.testQueryNull()
F. Monetary Amount Implementation Requirements
422-F1)
Implementations of MonetaryAmount must implement hashCode,
considering number, currency and implementation type,
monetary
context.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testImplementsHashCode()
422-F2)
Implementations of MonetaryAmount must implement
equals,
considering number, currency and implementation type,
monetary
context.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testImplementsEquals()
422-F3)
Implementations of MonetaryAmount must be Comparable.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testImplementComparable()
422-F4)
Implementations of MonetaryAmount must be immutable.
org.javamoney.tck.tests
ModellingMonetaryAmountsTest.testImmutable()
422-F5)
Implementations of MonetaryAmount should be thread-safe.
A. Testing Numeric Externalization for positive values
423-A1)
Checks if number type is not null and returning a concrete (no
abstract class or interface).
org.javamoney.tck.tests
ExternalizingNumericValueTest.testReturningNumberValueIsNotNull()
423-A2)
Check if a correct integer value is returned, no truncation is
allowed to be performed.
org.javamoney.tck.tests
ExternalizingNumericValueTest.testValidInteger()
423-A3)
Check if a correct long value is returned, no truncation is
allowed to be performed.
org.javamoney.tck.tests
ExternalizingNumericValueTest.testValidLong()
423-A4)
Check if a correct double value is returned, no truncation is
allowed to be performed.
org.javamoney.tck.tests
ExternalizingNumericValueTest.testValidDouble()
423-A5)
Check if a correct number value is returned, no truncation is
allowed to be performed.
Check should be done for every JDK type
supported.
org.javamoney.tck.tests
ExternalizingNumericValueTest.testValidNumberBD()
ExternalizingNumericValueTest.testValidNumberBI()
423-A6)
Check if a correct integer value is returned, truncation is
allowed to be performed.
org.javamoney.tck.tests
ExternalizingNumericValueTest.testValidIntegerWithTruncation()
423-A7)
Check if a correct long value is returned, truncation is
allowed to be performed.
org.javamoney.tck.tests
ExternalizingNumericValueTest.testValidLongWithTruncation()
423-A8)
Check if a correct double value is returned, truncation is
allowed to be performed.
org.javamoney.tck.tests
ExternalizingNumericValueTest.testValidDoubleWithTruncation()
423-A9)
Check if a correct number value is returned, truncation is
allowed to be performed.
Check should be done for every JDK type
supported.
org.javamoney.tck.tests
ExternalizingNumericValueTest.testValidNumberWithTruncation_Byte()
ExternalizingNumericValueTest.testValidNumberWithTruncation_Short()
ExternalizingNumericValueTest.testValidNumberWithTruncation_Float()
ExternalizingNumericValueTest.testValidNumberWithTruncation_Double()
ExternalizingNumericValueTest.testValidNumberWithTruncation_Integer()
423-A10)
Test correct precision values, including border cases.
org.javamoney.tck.tests
ExternalizingNumericValueTest.testPrecisionValues()
423-A11)
Test correct scale values, including border cases.
org.javamoney.tck.tests
ExternalizingNumericValueTest.testScaleValues()
B. Testing Numeric Externalization for negative values
423-B1)
Checks if number type is not null and returning a concrete (no
abstract class or interface).
org.javamoney.tck.tests
ExternalizingNumericValueTest.testNumberTypeNegative()
423-B2)
Check if a correct integer value is returned, no truncation is
allowed to be performed.
org.javamoney.tck.tests
ExternalizingNumericValueTest.testIntegerNegative()
423-B3)
Check if a correct long value is returned, no truncation is
allowed to be performed.
org.javamoney.tck.tests
ExternalizingNumericValueTest.testLongNegative()
423-B4)
Check if a correct double value is returned, no truncation is
allowed to be performed.
org.javamoney.tck.tests
ExternalizingNumericValueTest.testDoubleNegative()
423-B5)
Check if a correct number value is returned, no truncation is
allowed to be performed.
Check should be done for every JDK type
supported.
org.javamoney.tck.tests
ExternalizingNumericValueTest.testNumberWithTruncationNegative()
423-B6)
Check if a correct integer value is returned, truncation is
allowed to be performed.
org.javamoney.tck.tests
ExternalizingNumericValueTest.testIntegerWithTruncationNegative()
423-B7)
Check if a correct long value is returned, truncation is
allowed to be performed.
org.javamoney.tck.tests
ExternalizingNumericValueTest.testLongWithTruncationNegative()
423-B8)
Check if a correct double value is returned, truncation is
allowed to be performed.
org.javamoney.tck.tests
ExternalizingNumericValueTest.testDoubleWithTruncationNegative()
423-B9)
Check if a correct number value is returned, truncation is
allowed to be performed.
Check should be done for every JDK type
supported.
org.javamoney.tck.tests
ExternalizingNumericValueTest.testNumberValueWithTruncationNegative()
ExternalizingNumericValueTest.testNumberValueWithTruncationNegative_Short()
ExternalizingNumericValueTest.testNumberValueWithTruncationNegative_Integer()
ExternalizingNumericValueTest.testNumberValueWithTruncationNegative_Long()
ExternalizingNumericValueTest.testNumberValueWithTruncationNegative_Float()
ExternalizingNumericValueTest.testNumberValueWithTruncationNegative_Double()
423-B10)
Test correct precision values, including border cases.
org.javamoney.tck.tests
ExternalizingNumericValueTest.testPrecisionNegative()
423-B11)
Test correct scale values, including border cases.
org.javamoney.tck.tests
ExternalizingNumericValueTest.testScaleNegative()
C. Testing Numeric Externalization for zero values
423-C1)
Checks if number type is not null and returning a concrete (no
abstract class or interface).
org.javamoney.tck.tests
ExternalizingNumericValueTest.testNumberTypeZero()
423-C2)
Check if a correct integer value is returned, no truncation is
allowed to be performed.
org.javamoney.tck.tests
ExternalizingNumericValueTest.testIntegerZero()
423-C3)
Check if a correct long value is returned, no truncation is
allowed to be performed.
org.javamoney.tck.tests
ExternalizingNumericValueTest.testLongZero()
423-C4)
Check if a correct number value is returned, no truncation is
allowed to be performed. Check should be done for every JDK type
supported.
org.javamoney.tck.tests
ExternalizingNumericValueTest.testNumberValueZero()
423-C5)
Check if a correct integer value is returned, truncation is
allowed to be performed (but is not necessary).
org.javamoney.tck.tests
ExternalizingNumericValueTest.testIntegerValueWithTruncationZero()
423-C6)
Check if a correct long value is returned, truncation is
allowed to be performed (but is not necessary).
org.javamoney.tck.tests
ExternalizingNumericValueTest.testLongValueWithTruncationZero()
423-C7)
Check if a correct double value is returned, truncation is
allowed to be performed (but is not necessary).
org.javamoney.tck.tests
ExternalizingNumericValueTest.testDoubleValueWithTruncationZero()
423-C8)
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.
org.javamoney.tck.tests
ExternalizingNumericValueTest.testNumberValueWithTruncationZero()
423-C9)
Test correct precision values, including border cases.
org.javamoney.tck.tests
ExternalizingNumericValueTest.testPrecisionZero()
423-C10)
Test correct scale values, including border cases.
org.javamoney.tck.tests
ExternalizingNumericValueTest.testScaleZero()
A. Monetary Operator Implementation Requirements
424-A1)
The return type of apply must be the same type as the
parameter
(amount.getClass() == result.getClass()).
org.javamoney.tck.tests
FunctionalExtensionPointsTest.testOperatorReturnTypeEqualsParameter()
A. Accessing MonetaryAmount Factories
426-A1)
Access a MonetaryAmountFactory for each registered type.
org.javamoney.tck.tests
CreatingMonetaryAmountsTest.testAccessToMonetaryAmountFactory()
426-A2)
Checks if getAmountType returns the correct type.
org.javamoney.tck.tests
CreatingMonetaryAmountsTest.testMonetaryAmountFactoryReturnsCorrectType()
426-A3)
Checks for default and max MonetaryContext.
org.javamoney.tck.tests
CreatingMonetaryAmountsTest.testMonetaryAmountFactoryMinMaxCapabilities()
426-A4)
Checks if capabilities of default MonetaryContext are less
than Max
MonetaryContext.
org.javamoney.tck.tests
CreatingMonetaryAmountsTest.testMonetaryAmountFactoryMinMaxCapabilities_Compare()
B. Testing Creation of Amounts with zero values
426-B1)
For each MonetaryAmount Factory: Create zero amounts from a
factory with currencies.
org.javamoney.tck.tests
CreatingMonetaryAmountsTest.testMonetaryAmountFactoryCreateZeroAmountsWithDiffCurrencies()
426-B2)
For each MonetaryAmount Factory: Create zero amounts from a
factory with monetary contexts.
org.javamoney.tck.tests
CreatingMonetaryAmountsTest.testMonetaryAmountFactoryCreateZeroAmountsWithDiffContexts()
CreatingMonetaryAmountsTest.testMonetaryAmountFactoryCreateZeroAmountsWithDiffContexts2()
CreatingMonetaryAmountsTest.testMonetaryAmountFactoryCreateZeroAmountsWithDiffContexts3()
426-B3)
For each MonetaryAmount Factory: Bad Case: Create zero amounts
from a factory with an invalid currency.
org.javamoney.tck.tests
CreatingMonetaryAmountsTest.testMonetaryAmountFactoryCreateAmountsWithInvalidCurrency()
426-B4)
For each MonetaryAmount Factory: Bad Case: Create zero amounts
from a factory with an invalid MonetaryContext.
org.javamoney.tck.tests
CreatingMonetaryAmountsTest.testMonetaryAmountFactoryCreateAmountsWithInvalidMonetaryContext()
C. Testing Creation of Amounts with positive values
426-C1)
For each MonetaryAmount Factory: Create positive amounts from
a factory with currencies.
org.javamoney.tck.tests
CreatingMonetaryAmountsTest.testMonetaryAmountFactoryCreatePositiveAmountsWitCurrencies()
426-C2)
For each MonetaryAmount Factory: Create positive amounts from
a factory with monetary contexts.
org.javamoney.tck.tests
CreatingMonetaryAmountsTest.testMonetaryAmountFactoryCreatePositiveAmountsWithContexts()
CreatingMonetaryAmountsTest.testMonetaryAmountFactoryCreatePositiveAmountsWithContexts2()
CreatingMonetaryAmountsTest.testMonetaryAmountFactoryCreatePositiveAmountsWithContexts3()
426-C3)
For each MonetaryAmount Factory: Bad Case: Create positive
amounts from a factory with an invalid numeric value (exceeding max
MonetaryContext).
org.javamoney.tck.tests
CreatingMonetaryAmountsTest.testMonetaryAmountFactoryCreatePositiveAmountsWithInvalidNumber()
426-C4)
For each MonetaryAmount Factory: Bad Case: Create positive
amounts from a factory with an invalid currency.
org.javamoney.tck.tests
CreatingMonetaryAmountsTest.testMonetaryAmountFactoryCreatePositiveNoCurrency_BadCase()
CreatingMonetaryAmountsTest.testMonetaryAmountFactoryCreatePositiveInvalidCurrency_BadCase()
426-C5)
For each MonetaryAmount Factory: Bad Case: Create positive
amounts from a factory with an invalid MonetaryContext.
org.javamoney.tck.tests
CreatingMonetaryAmountsTest.testMonetaryAmountFactoryCreatePositiveInvalidContext_BadCase()
D. Testing Creation of Amounts with negative values
426-D1)
For each MonetaryAmount Factory: Create negative amounts from
a factory with currencies.
org.javamoney.tck.tests
CreatingMonetaryAmountsTest.testMonetaryAmountFactoryNegativePositiveAmountsWitCurrencies()
426-D2)
For each MonetaryAmount Factory: Create negative amounts from
a factory with monetary contexts.
org.javamoney.tck.tests
CreatingMonetaryAmountsTest.testMonetaryAmountFactoryNegativePositiveAmountsWithContexts()
CreatingMonetaryAmountsTest.testMonetaryAmountFactoryNegativePositiveAmountsWithContexts2()
CreatingMonetaryAmountsTest.testMonetaryAmountFactoryNegativePositiveAmountsWithContexts3()
426-D3)
For each MonetaryAmount Factory: Bad Case: Create negative
amounts from a factory with an invalid numeric value (exceeding max
MonetaryContext).
org.javamoney.tck.tests
CreatingMonetaryAmountsTest.testMonetaryAmountFactoryNegativePositiveAmountsWithInvalidNumber()
426-D4)
For each MonetaryAmount Factory: Bad Case: Create negative
amounts from a factory with an invalid currency.
org.javamoney.tck.tests
CreatingMonetaryAmountsTest.testMonetaryAmountFactoryCreateNegativeNoCurrency_BadCase()
CreatingMonetaryAmountsTest.testMonetaryAmountFactoryCreateNegativeInvalidCurrency_BadCase()
426-D5)
For each MonetaryAmount Factory: Bad Case: Create negative
amounts from a factory with an invalid MonetaryContext.
org.javamoney.tck.tests
CreatingMonetaryAmountsTest.testMonetaryAmountFactoryCreateNegativeInvalidContext_BadCase()
A. Accessing Currencies
427-A1)
Test if Monetary provides all ISO related entries,
similar to the JDK.
org.javamoney.tck.tests
AccessingCurrenciesAmountsRoundingsTest.testAllISOCurrenciesAvailable()
427-A2)
Test if Monetary provides all Locale related
entries, similar to the JDK.
org.javamoney.tck.tests
AccessingCurrenciesAmountsRoundingsTest.testAllLocaleCurrenciesAvailable()
427-A3)
Test if Monetary provides correct check for ISO
codes.
org.javamoney.tck.tests
AccessingCurrenciesAmountsRoundingsTest.testCorrectISOCodes()
427-A4)
Test if Monetary provides correct check for
Locales.
org.javamoney.tck.tests
AccessingCurrenciesAmountsRoundingsTest.testCorrectLocales()
427-A5)
Test for custom Monetary provided, based on the TCK
TestProvider.
org.javamoney.tck.tests
AccessingCurrenciesAmountsRoundingsTest.testCustomCurrencies()
B. Accessing Monetary Amount Factories
427-B1)
Ensure the types available, must be at least one type.
org.javamoney.tck.tests
CreatingMonetaryAmountsTest.testMonetaryAmountTypes_Available()
427-B2)
Ensure amount factories are accessible for all types
available,
providing also the
some test implementations with the
TCK.
org.javamoney.tck.tests
AccessingCurrenciesAmountsRoundingsTest.testAmountTypesProvided()
427-B3)
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.
org.javamoney.tck.tests
AccessingCurrenciesAmountsRoundingsTest.testAmountTypesInstantiatable()
427-B4)
Ensure correct query function implementations, providing also
the
some test implementations with the TCK.
org.javamoney.tck.tests
AccessingCurrenciesAmountsRoundingsTest.testAmountQueryType()
427-B5)
Ensure a default factory is returned. Test javamoney.config
for
configuring default value.
org.javamoney.tck.tests
AccessingCurrenciesAmountsRoundingsTest.testAmountDefaultType()
C. Accessing Roundings
427-C1)
Access roundings using all defined currencies, including TCK
custom currencies.
org.javamoney.tck.tests
AccessingCurrenciesAmountsRoundingsTest.testAccessRoundingsForCustomCurrencies_Default()
AccessingCurrenciesAmountsRoundingsTest.testAccessRoundingsForCustomCurrencies_Explicit()
AccessingCurrenciesAmountsRoundingsTest.testAccessRoundingsForCustomCurrencies_Explicit_Null()
427-C2)
Access roundings using a MonetaryContext. Use different
MathContext/RoundingMode, as an attribute, when running
on the JDK.
org.javamoney.tck.tests
AccessingCurrenciesAmountsRoundingsTest.testAccessRoundingsWithRoundingContext()
AccessingCurrenciesAmountsRoundingsTest.testAccessRoundingsWithMonetaryContext_Null()
427-C3)
Access custom roundings and ensure TCK custom roundings are
registered.
org.javamoney.tck.tests
AccessingCurrenciesAmountsRoundingsTest.testAccessCustomRoundings()
427-C4)
Test TCK custom roundings.
org.javamoney.tck.tests
AccessingCurrenciesAmountsRoundingsTest.testCustomRoundings()
AccessingCurrenciesAmountsRoundingsTest.testCustomRoundings_Null()
AccessingCurrenciesAmountsRoundingsTest.testCustomRoundings_Foo()
A. Test Basic MonetaryConversions Accessors
431-A1)
Ensure at least one conversion provider is accessible.
org.javamoney.tck.tests.conversion
MonetaryConversionsTest.testProvidersAvailable()
431-A2)
Access and test different Currency Conversions for the provider in place.
org.javamoney.tck.tests.conversion
MonetaryConversionsTest.testConversionsAreAvailable()
MonetaryConversionsTest.testConversionsAreAvailableWithQuery()
431-A3)
Access and test the provider's meta data.
org.javamoney.tck.tests.conversion
MonetaryConversionsTest.testProviderMetadata()
MonetaryConversionsTest.testProviderMetadata2()
MonetaryConversionsTest.testProviderMetadata3()
MonetaryConversionsTest.testProviderMetadata2WithContext()
MonetaryConversionsTest.testProviderMetadata3WithContext()
431-A4)
Access the default provider chain (must be defined).
org.javamoney.tck.tests.conversion
MonetaryConversionsTest.testDefaultProviderChainIsDefined()
MonetaryConversionsTest.testDefaultProviderChainIsDefinedDefault()
MonetaryConversionsTest.testDefaultProviderChainIsDefinedDefault2()
MonetaryConversionsTest.testDefaultProviderChainIsDefinedDefaultWithContext()
431-A5)
Access and test conversion using the default provider chain.
org.javamoney.tck.tests.conversion
MonetaryConversionsTest.testDefaultConversion()
431-A6)
Bad case: Test access of an inexistent provider.
org.javamoney.tck.tests.conversion
MonetaryConversionsTest.testUseInvalidProvider()
431-A7)
Bad case: Test inclusion of an inexistent provider in a provider chain.
org.javamoney.tck.tests.conversion
MonetaryConversionsTest.testUseInvalidProviderWithinChain()
A. Test Basic MonetaryConversions Accessors
432-A1)
Test successful conversion for possible currency pairs.
org.javamoney.tck.tests.conversion
ConvertingAmountsTest.testConversion()
432-A2)
Compare conversions done with exchange rates provided for same conversion.
org.javamoney.tck.tests.conversion
ConvertingAmountsTest.testConversionComparedWithRate()
432-A3)
Bad case: try converting from/to an inconvertible (custom) currency, ensure
CurrencyConversionException is thrown.
org.javamoney.tck.tests.conversion
ConvertingAmountsTest.testUnsupportedConversion()
432-A4)
Bad case: try converting from/to a null currency, ensure CurrencyConversionException is thrown.
org.javamoney.tck.tests.conversion
ConvertingAmountsTest.testNullConversion1()
ConvertingAmountsTest.testNullConversion2()
A. Test Basic MonetaryConversions Accessors
433-A1)
Test access to conversion rates.
org.javamoney.tck.tests.conversion
ExchangeRatesAndRateProvidersTest.testAccessKnownRates()
ExchangeRatesAndRateProvidersTest.testAccessKnownRatesWithCodes()
ExchangeRatesAndRateProvidersTest.testAccessKnownRatesAndContext()
ExchangeRatesAndRateProvidersTest.testAccessKnownRatesWithCodesAndContext()
ExchangeRatesAndRateProvidersTest.testAccessRates_IdentityRatesWithUnits()
ExchangeRatesAndRateProvidersTest.testAccessRates_IdentityRatesWithCodes()
ExchangeRatesAndRateProvidersTest.testAccessRates_IdentityRatesWithUnitsAndContext()
433-A2)
Ensure additional ConversionContext is passed correctly to SPIs.
org.javamoney.tck.tests.conversion
ExchangeRatesAndRateProvidersTest.testPassingOverConversionContextToSPIs()
433-A3)
Bad case: try accessing rates with incosistent data.
org.javamoney.tck.tests.conversion
ExchangeRatesAndRateProvidersTest.testInvalidUsage_InvalidSourceCurrency()
ExchangeRatesAndRateProvidersTest.testInvalidUsage_NullSourceCurrency()
ExchangeRatesAndRateProvidersTest.testInvalidUsage_InvalidTargetCurrency()
ExchangeRatesAndRateProvidersTest.testInvalidUsage_NullTargetCurrency()
ExchangeRatesAndRateProvidersTest.testInvalidUsage_InvalidSourceCurrencyAndContext()
ExchangeRatesAndRateProvidersTest.testInvalidUsage_NullSourceCurrencyUnit()
ExchangeRatesAndRateProvidersTest.testInvalidUsage_NullTargetCurrencyUnit()
A. Test Basic MonetaryConversions Accessors
434-A1)
Test correct rate evaluation for different provider chains, providers defined by the TCK.
org.javamoney.tck.tests.conversion
ProviderChainsTest.testCorrectRateEvaluationInChain_diffProviders()
ProviderChainsTest.testCorrectRateEvaluationInChain_sameProviders()
434-A2)
Test correct rate evaluation for different provider chains, providers defined by the TCK, with
historic rates.
org.javamoney.tck.tests.conversion
ProviderChainsTest.testCorrectRateEvaluationInChainHistoric()
434-A3)
Test availability of providers defined by the TCK.
org.javamoney.tck.tests.conversion
ProviderChainsTest.testTCKRateChainAvailability()
A. Test all concrete MonetaryAmountFormat Implementations
441-A1)
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.
org.javamoney.tck.tests.format
FormattingMonetaryAmountsTest.testNoDepOnAmountImplementation()
441-A2)
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.
org.javamoney.tck.tests.format
FormattingMonetaryAmountsTest.testFormattingIsIndependentOfImplementation()
441-A3)
Parse back several amounts, input created using the
formatting
from 'Format_formatAmounts'.
org.javamoney.tck.tests.format
FormattingMonetaryAmountsTest.testParseIsIndependentOfImplementation()
441-A4)
Get/set default currency, try to parse patterns without
currency information.
org.javamoney.tck.tests.format
FormattingMonetaryAmountsTest.testParseWithDifferentCurrencies()
442-A1)
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.
org.javamoney.tck.tests.format
FormattingMonetaryAmountsTest.testParseDifferentStyles()
B. Accessing Monetary Amount Formats
443-A1)
AccessingMonetaryAmountFormat using
MonetaryFormats.getAmountFormat(Locale locale), all locales
available also from java.text.DecimalFormat must be supported.
org.javamoney.tck.tests.format
FormattingMonetaryAmountsTest.testLocalesSupported()
443-A2)
AccessingMonetaryAmountFormat using
MonetaryFormats.getAmountFormat(AmountStyle style), all locales
available also from java.text.DecimalFormat must be supported
(using AmountStyle.of(Locale)).
org.javamoney.tck.tests.format
FormattingMonetaryAmountsTest.testGetAmountFormat()
443-A3)
Test
MonetaryFormats.getAvailableLocales, all locales
available
also from java.text.DecimalFormat must be supported
(using
AmountStyle.of(Locale)), more locales are possible.
org.javamoney.tck.tests.format
FormattingMonetaryAmountsTest.testGetAvailableLocales()
FormattingMonetaryAmountsTest.testAmountStyleOf()
A. Registering Currencies
451-A1)
Test registered CurrencyProviderSpi (at least one instance
required). Test behaviour,
especially bad case behaviour for invalid
input.
org.javamoney.tck.tests.spi
CoreSPITests.testCurrencyProviderSpi()
451-A2)
Test registered MonetarySingletonSpi (at least one instance
required). Test behaviour, especially bad case behaviour for invalid
input.
org.javamoney.tck.tests.spi
CoreSPITests.testMonetaryAmountsSingletonSpi2()
B. Registering Monetary Amount Factories
451-B1)
Test registered MonetarySpi (at least one instance
required). Test behaviour,
especially bad case behaviour for invalid
input.
org.javamoney.tck.tests.spi
CoreSPITests.testMonetaryAmountFactoryProviderSpis()
C. Backing the Monetary Singleton
451-C1)
Test registered RoundingProviderSpi (at least one instance
required). Test behaviour,
especially bad case behaviour for invalid
input.
org.javamoney.tck.tests.spi
CoreSPITests.testMonetaryAmountsSingletonSpi()
D. Registering Roundings
451-D1)
Test registered RoundingProviderSpi (at least one instance
required). Test behaviour,
especially bad case behaviour for invalid
input.
org.javamoney.tck.tests.spi
CoreSPITests.testRoundingProviderSpi()
A. Adapting Currency Conversion
452-A1)
Test SPI for ExhcnageRateProviders.
org.javamoney.tck.tests.spi
CoreSPITests.testExchangeRateProviderSpi()
452-A2)
Test SPI for MonetaryConversions.
org.javamoney.tck.tests.spi
CoreSPITests.testMonetaryConversionsSingletonSpi()
A. Prodivding Amount Formats
453-A1)
Test registered MonetaryAmountFormatProviderSpi (one is
required), especially bad case behaviour for invalid input.
org.javamoney.tck.tests.spi
FormattingSPITest.testMonetaryAmountFormatProviderSpiIsRegistered()