Java Reference
In-Depth Information
first input is the Member member parameter passed to the method. The second is the
MembershipLevel object returned by the MembershipLevelManager EJB.
Full unit test coverage of this method will depend on providing all the different combina-
tions of input to verify all the possible outputs.
Because unit testing is supposed to run quickly to verify the correct execution of individual
classes, unit tests are typically included in the same project as the classes they're testing.
The DiscountManagerBeanTest shown in the following listing can be found in the
chapter15-ejb Maven submodule of this chapter's code. Now let's see how to write
the unit test.
Listing 15.2. DiscountManagerBeanTest
 
Search WWH ::




Custom Search