Embed presentation
Downloaded 22 times








![Assertions
Assertion Description
fail(string) Fails with message
assertTrue([message], Asserts if true
boolean condition)
assertsEquals([String Asserts if equal
message], expected,
actual)
assertNull([message], Asserts if object is null
object)
assertNotNull([message], Asserts if object is not null
object)](https://image.slidesharecdn.com/presentationandroidjunit-120903044831-phpapp01/75/Presentation-android-JUnit-9-2048.jpg)




This document discusses unit testing in Android with JUnit, including what unit testing is, how to use JUnit for unit tests, common JUnit annotations used to identify test methods and control test execution, and common JUnit assertions. It also briefly mentions testing Android activities, content providers, and services, as well as continuous integration with Maven. Links are provided to the JUnit and Android developer documentation for further information.








![Assertions
Assertion Description
fail(string) Fails with message
assertTrue([message], Asserts if true
boolean condition)
assertsEquals([String Asserts if equal
message], expected,
actual)
assertNull([message], Asserts if object is null
object)
assertNotNull([message], Asserts if object is not null
object)](https://image.slidesharecdn.com/presentationandroidjunit-120903044831-phpapp01/75/Presentation-android-JUnit-9-2048.jpg)


