JSR 354 provides an API for representing, transporting, and performing comprehensive calculations with Money and Currency. For more details see JavaMoney.org and JSR 354: Money and Currency API
The current module contains the technical compatibility kit of JSR 354.
Basically the TCK can be run as a standalone application. Hereby you must ensure you add the following libraries to your classpath:
- the TCK itself
- the JSR 354 API jar (for Java 8 and above)
- your implementation under test and all its dependencies
- TestNG and all its dependencies
- your implementation and SE service registration of
org.javamoney.tck.JSR354TestConfiguration
You can do this all manually, use your IDE or use Maven, the latter by performing the following tasks:
-
Create a new project Maven or Gradle.
-
Add dependencies:
- Add this TCK org.javamoney:javamoney-tck
- Add the target API javax.money:money-api for Java 8 and above
- and your implementation as dependency
-
Implement a class of type org.javamoney.tck.JSR354TestConfiguration, read the Javadoc, what you must provide with this class.
-
Add a single test class with a single test as follows:
@Test public void runTCK(){ TCKRunner.main(); }
-
To execute the TCK, simply execute
mvn clean test
-
Go to target - there you will find your TCK test results.
As jump-start you can clone javamoney-tck-usage-example
Additional details and options are documented in user guide.
The JSR 354 Team.
This module is licenced under the the Apache 2 Licence.