Skip to Content
Java EE 8 and Angular
book

Java EE 8 and Angular

by Prashant Padmanabhan
January 2018
Intermediate to advanced
348 pages
8h 17m
English
Packt Publishing
Content preview from Java EE 8 and Angular

Unit testing

This is the simplest form of tests one would write to verify the finer details within the code. The subject of the test is usually a class or a couple of classes that collaborate with each other. The code can be tested without starting up a Java EE container, making it extremely fast to run. The pyramid's layer for unit tests shows that we should invest in building a larger number of unit tests than others, as these are easier to maintain, and it helps with faster feedback. Some popular frameworks for unit testing include JUnit and TestNG.

Since most of the Java EE components such as EJBs are just classes with annotations, it is easy to unit test them without a container. However, doing so does not aid in testing the component ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Building Web Apps with Spring 5 and Angular

Building Web Apps with Spring 5 and Angular

Ajitesh Kumar Shukla

Publisher Resources

ISBN: 9781788291200Supplemental Content