August 2017
Beginner
298 pages
7h 26m
English
Let's examine how this works by testing the packt.sortutil from the sample address book viewer application. The code is available at the 12-build-tools-and-testing/02-testing location. The src folder contains the packt.sortutil module--the module under test.
To test this, we can create a new test module: packt.sortutil.test. A good convention to follow is to name the test modules with the name of the module being tested followed by .test. Here's the module definition for packt.sortutil.test:
module packt.sortutil.test {
requires packt.sortutil;
}
By declaring the dependency on the module, you can access its exported types and test them through code. Here's a sample class in the test module that verifies that the ...
Read now
Unlock full access