Book Image

Android Application Development with Maven

Book Image

Android Application Development with Maven

Overview of this book

Table of Contents (14 chapters)

Running typical unit tests


From this chapter until the end of this book, we will use a sample project to demonstrate the topics we will cover. For this one, we will reuse the basic structure of the three-module (model, service, and AndroidTier) Maven project we introduced in Chapter 2, Starting the Development Phase, with some naming modifications, and we will build on top of this. The complete source code can be found on the following GitHub link https://github.com/ppapapetrou76/AndroidMavenDevelopment/tree/master/Chapter3.

Note

Assume that you have a git client installed in your machine, you can clone the project locally by running the following command:

git clone https://github.com/ppapapetrou76/AndroidMavenDevelopment.

Running our first unit test with Maven is easy. By default, Maven uses the maven-surefire-plugin command to execute unit tests for all files found under the /src/test/java/ directory; so, we don't need to add any dependency to our pom.xml file. We need, however, to add a...