Java Code Examples for android.test.MoreAsserts#assertMatchesRegex()
The following examples show how to use
android.test.MoreAsserts#assertMatchesRegex() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MyApplicationTest.java From codeexamples-android with Eclipse Public License 1.0 | 4 votes |
public void testCorrectVersion() throws Exception { PackageInfo info = application.getPackageManager().getPackageInfo(application.getPackageName(), 0); assertNotNull(info); MoreAsserts.assertMatchesRegex("\\d\\.\\d", info.versionName); }
Example 2
Source File: ApplicationTest.java From codeexamples-android with Eclipse Public License 1.0 | 4 votes |
public void testCorrectVersion() throws Exception { PackageInfo info = application.getPackageManager().getPackageInfo(application.getPackageName(), 0); assertNotNull(info); MoreAsserts.assertMatchesRegex("\\d\\.\\d", info.versionName); }