March 2015
Beginner to intermediate
274 pages
6h 1m
English
If the assertions that are reviewed previously do not seem to be enough for your tests' needs, there is still another class included in the Android framework that covers other cases. This class is MoreAsserts (http://developer.android.com/reference/android/test/MoreAsserts.html).
These methods are also overloaded to support different parameter types. Among the assertions, we can find the following:
assertAssignableFrom: This asserts that an object is assignable to a class.assertContainsRegex: This asserts that an expected Regex matches any substring of the specified String. It fails with the specified message if it does not.assertContainsInAnyOrder: This asserts that the specified Iterable contains precisely the elements expected, ...Read now
Unlock full access