/external/robolectric/src/test/java/com/xtremelabs/robolectric/shadows/ |
TextUtilsTest.java | 17 assertThat( 24 assertThat(TextUtils.isEmpty(null), equalTo(true)); 25 assertThat(TextUtils.isEmpty(""), equalTo(true)); 26 assertThat(TextUtils.isEmpty(" "), equalTo(false)); 27 assertThat(TextUtils.isEmpty("123"), equalTo(false)); 31 assertThat(TextUtils.join(",", new String[] { "1" }), equalTo("1")); 32 assertThat(TextUtils.join(",", new String[] { "1", "2", "3" }), equalTo("1,2,3")); 33 assertThat(TextUtils.join(",", Arrays.asList("1", "2", "3")), equalTo("1,2,3")); 38 assertThat(TextUtils.isDigitsOnly("123456"), equalTo(true)); 39 assertThat(TextUtils.isDigitsOnly("124a56"), equalTo(false)) [all...] |
StatFsTest.java | 4 import static org.junit.Assert.assertThat; 21 assertThat(statsFs.getBlockCount(), equalTo(100)); 22 assertThat(statsFs.getFreeBlocks(), equalTo(20)); 23 assertThat(statsFs.getAvailableBlocks(), equalTo(10)); 24 assertThat(statsFs.getBlockSize(), equalTo(ShadowStatFs.BLOCK_SIZE)); 32 assertThat(statsFs.getBlockCount(), equalTo(100)); 33 assertThat(statsFs.getFreeBlocks(), equalTo(20)); 34 assertThat(statsFs.getAvailableBlocks(), equalTo(10)); 35 assertThat(statsFs.getBlockSize(), equalTo(ShadowStatFs.BLOCK_SIZE)); 41 assertThat(statsFs.getBlockCount(), equalTo(0)) [all...] |
AbstractCursorTest.java | 6 import static org.junit.Assert.assertThat; 34 assertThat(cursor.moveToFirst(), equalTo(true)); 35 assertThat(cursor.getCount(), equalTo(1)); 40 assertThat(cursor.moveToFirst(), equalTo(false)); 41 assertThat(cursor.getCount(), equalTo(0)); 49 assertThat(cursor.moveToLast(), equalTo(true)); 50 assertThat(cursor.getCount(), equalTo(2)); 55 assertThat(cursor.moveToLast(), equalTo(false)); 56 assertThat(cursor.getCount(), equalTo(0)); 64 assertThat(cursor.moveToFirst(), equalTo(true)) [all...] |
MediaRecorderTest.java | 14 import static org.junit.Assert.assertThat; 30 assertThat(shadowMediaRecorder.getAudioChannels(), not(equalTo(2))); 32 assertThat(shadowMediaRecorder.getAudioChannels(), equalTo(2)); 37 assertThat(shadowMediaRecorder.getAudioEncoder(), not(equalTo(MediaRecorder.AudioEncoder.AMR_NB))); 38 assertThat(shadowMediaRecorder.getState(), not(equalTo(ShadowMediaRecorder.STATE_DATA_SOURCE_CONFIGURED))); 40 assertThat(shadowMediaRecorder.getAudioEncoder(), equalTo(MediaRecorder.AudioEncoder.AMR_NB)); 41 assertThat(shadowMediaRecorder.getState(), equalTo(ShadowMediaRecorder.STATE_DATA_SOURCE_CONFIGURED)); 46 assertThat(shadowMediaRecorder.getAudioEncodingBitRate(), not(equalTo(128000))); 48 assertThat(shadowMediaRecorder.getAudioEncodingBitRate(), equalTo(128000)); 53 assertThat(shadowMediaRecorder.getAudioSamplingRate(), not(equalTo(22050))) [all...] |
TranslateAnimationTest.java | 12 import static org.junit.Assert.assertThat; 28 assertThat(shadow.getFromXType(), equalTo(1)); 29 assertThat(shadow.getFromXValue(), equalTo(2f)); 30 assertThat(shadow.getToXType(), equalTo(3)); 31 assertThat(shadow.getToXValue(), equalTo(4f)); 32 assertThat(shadow.getFromYType(), equalTo(5)); 33 assertThat(shadow.getFromYValue(), equalTo(6f)); 34 assertThat(shadow.getToYType(), equalTo(7)); 35 assertThat(shadow.getToYValue(), equalTo(8f)); 43 assertThat(shadow2.getFromXType(), equalTo(defType)) [all...] |
AnimationTest.java | 15 import static org.junit.Assert.assertThat; 34 assertThat(listener.wasStartCalled, equalTo(false)); 36 assertThat(listener.wasStartCalled, equalTo(true)); 37 assertThat(listener.wasEndCalled, equalTo(false)); 38 assertThat(listener.wasRepeatCalled, equalTo(false)); 43 assertThat(listener.wasEndCalled, equalTo(false)); 45 assertThat(listener.wasStartCalled, equalTo(false)); 46 assertThat(listener.wasEndCalled, equalTo(true)); 47 assertThat(listener.wasRepeatCalled, equalTo(false)); 52 assertThat(listener.wasRepeatCalled, equalTo(false)) [all...] |
UriTest.java | 9 import static org.hamcrest.MatcherAssert.assertThat; 17 assertThat(testUri.getQuery(), equalTo("param=value&another_param=another_value")); 18 assertThat(testUri.getPort(), equalTo(8080)); 19 assertThat(testUri.getAuthority(), equalTo("someplace.com:8080")); 20 assertThat(testUri.getHost(), equalTo("someplace.com")); 21 assertThat(testUri.getFragment(), equalTo("top")); 22 assertThat(testUri.getPath(), equalTo("/a/path")); 23 assertThat(testUri.getScheme(), equalTo("http"));
|
SpannableStringTest.java | 6 import static org.junit.Assert.assertThat; 33 assertThat(spanStr.toString(), sameInstance(TEST_STRING)); 55 assertThat(spans, notNullValue()); 56 assertThat(spans.length, equalTo(1)); 57 assertThat((UnderlineSpan) spans[0], sameInstance(s2)); 68 assertThat(spans, notNullValue()); 69 assertThat(spans.length, equalTo(2)); 73 assertThat(spans, notNullValue()); 74 assertThat(spans.length, equalTo(1)); 75 assertThat((URLSpan) spans[0], sameInstance(s1)) [all...] |
SQLiteCursorTest.java | 20 import static org.junit.Assert.assertThat; 60 assertThat(columnNames, notNullValue()); 66 assertThat(cursor.getColumnIndex("id"), equalTo(0)); 67 assertThat(cursor.getColumnIndex("name"), equalTo(1)); 72 assertThat(cursor.getColumnIndex("Fred"), equalTo(-1)); 79 assertThat(cursor.getColumnIndex("id"), equalTo(0)); 80 assertThat(cursor.getColumnIndex("name"), equalTo(1)); 85 assertThat(cursor.getColumnIndexOrThrow("id"), equalTo(0)); 86 assertThat(cursor.getColumnIndexOrThrow("name"), equalTo(1)); 98 assertThat(cursor.getColumnIndexOrThrow("name"), equalTo(1)) [all...] |
MarginLayoutParamsTest.java | 11 import static org.junit.Assert.assertThat; 23 assertThat(marginLayoutParams.leftMargin, equalTo(1)); 24 assertThat(marginLayoutParams.topMargin, equalTo(2)); 25 assertThat(marginLayoutParams.rightMargin, equalTo(3)); 26 assertThat(marginLayoutParams.bottomMargin, equalTo(4));
|
CameraParametersTest.java | 18 import static org.junit.Assert.assertThat; 34 assertThat(shadowParameters.getPictureHeight(), not(equalTo(600))); 35 assertThat(shadowParameters.getPictureWidth(), not(equalTo(800))); 38 assertThat(pictureSize.width, equalTo(800)); 39 assertThat(pictureSize.height, equalTo(600)); 40 assertThat(shadowParameters.getPictureHeight(), equalTo(600)); 41 assertThat(shadowParameters.getPictureWidth(), equalTo(800)); 48 assertThat(fpsRange[1], not(equalTo(15))); 49 assertThat(fpsRange[0], not(equalTo(25))); 52 assertThat(fpsRange[1], equalTo(25)) [all...] |
TypedArrayTest.java | 4 import static org.hamcrest.MatcherAssert.assertThat; 32 assertThat(typedArray.getBoolean(0, true), equalTo(true)); 33 assertThat(typedArray.getBoolean(0, false), equalTo(false)); 38 assertThat(typedArray.getInt(0, 15), equalTo(15)); 39 assertThat(typedArray.getInteger(0, 24), equalTo(24)); 44 assertThat(typedArray.getFloat(0, 0.5f), equalTo(0.5f)); 49 assertThat(typedArray.getDimension(0, 0.5f), equalTo(0.5f)); 54 assertThat(typedArray.getDimensionPixelOffset(0, 2), equalTo(2)); 59 assertThat(typedArray.getDimensionPixelSize(0, 2), equalTo(2)); 64 assertThat(typedArray.getLayoutDimension(0, 2), equalTo(2)) [all...] |
IntentFilterTest.java | 9 import static org.junit.Assert.assertThat; 19 assertThat(intentFilter.getDataScheme(0), equalTo("http")); 20 assertThat(intentFilter.getDataScheme(1), equalTo("ftp")); 29 assertThat(intentFilter.getDataAuthority(0).getHost(), equalTo("test.com")); 30 assertThat(intentFilter.getDataAuthority(0).getPort(), equalTo(8080)); 31 assertThat(intentFilter.getDataAuthority(1).getHost(), equalTo("example.com")); 32 assertThat(intentFilter.getDataAuthority(1).getPort(), equalTo(42));
|
PreferenceTest.java | 8 import static org.junit.Assert.assertThat; 53 assertThat(shadow.getContext(), sameInstance(context)); 54 assertThat(shadow.getAttrs(), sameInstance((AttributeSet)attrs)); 55 assertThat(shadow.getDefStyle(), equalTo(defStyle)); 59 assertThat(shadow.getContext(), sameInstance( context )); 60 assertThat(shadow.getAttrs(), sameInstance((AttributeSet)attrs)); 61 assertThat(shadow.getDefStyle(), equalTo(0)); 65 assertThat(shadow.getContext(), sameInstance( context )); 66 assertThat(shadow.getAttrs(), nullValue()); 67 assertThat(shadow.getDefStyle(), equalTo(0)); [all...] |
WifiConfigurationTest.java | 11 import static org.junit.Assert.assertThat; 45 assertThat(copy.networkId, equalTo(1)); 46 assertThat(copy.SSID, equalTo("SSID")); 47 assertThat(copy.BSSID, equalTo("BSSID")); 48 assertThat(copy.preSharedKey, equalTo("preSharedKey")); 49 assertThat(copy.status, equalTo(666)); 50 assertThat(copy.wepTxKeyIndex, equalTo(777)); 51 assertThat(copy.priority, equalTo(2)); 52 assertThat(copy.hiddenSSID, equalTo(true)); 53 assertThat(copy.allowedKeyManagement.get(1), equalTo(true)) [all...] |
RectTest.java | 10 import static org.junit.Assert.assertThat; 21 assertThat(r.left, is(1)); 22 assertThat(r.top, is(2)); 23 assertThat(r.right, is(3)); 24 assertThat(r.bottom, is(4)); 31 assertThat(r.left, is(1)); 32 assertThat(r.top, is(2)); 33 assertThat(r.right, is(3)); 34 assertThat(r.bottom, is(4)); 41 assertThat(r.width(), is(10)) [all...] |
VibratorTest.java | 6 import static org.junit.Assert.assertThat; 33 assertThat(shadowVibrator.isVibrating(), is(true)); 34 assertThat(shadowVibrator.getMilliseconds(), equalTo(5000L)); 42 assertThat(shadowVibrator.isVibrating(), is(true)); 43 assertThat(shadowVibrator.getPattern(), equalTo(pattern)); 44 assertThat(shadowVibrator.getRepeat(), equalTo(2)); 50 assertThat(shadowVibrator.isVibrating(), is(true)); 51 assertThat(shadowVibrator.isCancelled(), is(false)); 54 assertThat(shadowVibrator.isVibrating(), is(false)); 55 assertThat(shadowVibrator.isCancelled(), is(true)) [all...] |
CountDownTimerTest.java | 16 import static org.junit.Assert.assertThat; 48 assertThat(msg, not(equalTo("onTick() is called"))); 50 assertThat(msg, equalTo("onTick() is called")); 55 assertThat(msg, not(equalTo("onFinish() is called"))); 57 assertThat(msg, equalTo("onFinish() is called")); 62 assertThat(shadowCountDownTimer.hasStarted(), equalTo(false)); 64 assertThat(timer, notNullValue()); 65 assertThat(shadowCountDownTimer.hasStarted(), equalTo(true)); 71 assertThat(timer, notNullValue()); 72 assertThat(shadowCountDownTimer.hasStarted(), equalTo(true)) [all...] |
ScanResultTest.java | 11 import static org.hamcrest.MatcherAssert.assertThat; 19 assertThat(scanResult.SSID, equalTo("SSID")); 20 assertThat(scanResult.BSSID, equalTo("BSSID")); 21 assertThat(scanResult.capabilities, equalTo("Caps")); 22 assertThat(scanResult.level, equalTo(11)); 23 assertThat(scanResult.frequency, equalTo(42));
|
DatabaseUtilsTest.java | 4 import static org.junit.Assert.assertThat; 16 assertThat( ShadowDatabaseUtils.sqlEscapeString( "foobar" ), equalTo( "'foobar'" ) ); 17 assertThat( ShadowDatabaseUtils.sqlEscapeString( "Rich's" ), equalTo( "'Rich''s'" ) );
|
ListPreferenceTest.java | 17 import static org.junit.Assert.assertThat; 33 assertThat(shadow, instanceOf(ShadowDialogPreference.class)); 40 assertThat(listPreference.getEntries(), nullValue()); 42 assertThat(listPreference.getEntries(), sameInstance(entries)); 47 assertThat(listPreference.getEntries(), nullValue()); 49 assertThat(listPreference.getEntries(), notNullValue()); 56 assertThat(listPreference.getEntryValues(), nullValue()); 58 assertThat(listPreference.getEntryValues(), sameInstance(entryValues)); 63 assertThat(listPreference.getEntryValues(), nullValue()); 65 assertThat(listPreference.getEntryValues(), notNullValue()); [all...] |
/external/robolectric/src/test/java/com/xtremelabs/robolectric/util/ |
SQLiteTestHelper.java | 6 import static org.junit.Assert.assertThat; 11 assertThat(colValues.get(0), instanceOf(Float.class)); 12 assertThat(colValues.get(1), instanceOf(byte[].class)); 13 assertThat(colValues.get(2), instanceOf(String.class)); 14 assertThat(colValues.get(3), instanceOf(Integer.class));
|
H2MapTest.java | 12 import static org.junit.Assert.assertThat; 26 assertThat(map.getDriverClassName(), equalTo("org.h2.Driver")); 31 assertThat(map.getConnectionString(), equalTo("jdbc:h2:mem:")); 36 assertThat(map.getScrubSQL("autoincrement"), equalTo("auto_increment")); 41 assertThat(map.getScrubSQL("integer"), equalTo("bigint(19)")); 61 assertThat(map.getSelectLastInsertIdentity(), equalTo("SELECT IDENTITY();")); 66 assertThat(map.getResultSetType(), equalTo(ResultSet.TYPE_SCROLL_INSENSITIVE)); 71 assertThat(map.getScrubSQL("INSERT INTO "), equalTo("INSERT INTO ")); 72 assertThat(map.getScrubSQL("INSERT OR ROLLBACK INTO "), equalTo("INSERT INTO ")); 73 assertThat(map.getScrubSQL("INSERT OR ABORT INTO "), equalTo("INSERT INTO ")) [all...] |
/external/robolectric/src/test/java/android/webkit/ |
TestWebSettingsTest.java | 12 import static org.junit.Assert.assertThat; 28 assertThat(webSettings.getAllowFileAccess(), equalTo(true)); 29 assertThat(webSettings.getBlockNetworkImage(), equalTo(false)); 30 assertThat(webSettings.getBlockNetworkLoads(), equalTo(false)); 31 assertThat(webSettings.getBuiltInZoomControls(), equalTo(true)); 32 assertThat(webSettings.getDatabaseEnabled(), equalTo(false)); 33 assertThat(webSettings.getDomStorageEnabled(), equalTo(false)); 34 assertThat(webSettings.getJavaScriptEnabled(), equalTo(false)); 35 assertThat(webSettings.getLightTouchEnabled(), equalTo(false)); 36 assertThat(webSettings.getLoadWithOverviewMode(), equalTo(false)) [all...] |
/external/robolectric/src/test/java/com/xtremelabs/robolectric/tester/org/apache/http/ |
TestHttpResponseTest.java | 13 import static org.junit.Assert.assertThat; 23 assertThat(resp.getFirstHeader("None"), nullValue()); 24 assertThat(new TestHttpResponse(200, "OK").getFirstHeader("Foo"), nullValue()); 27 assertThat(resp.getFirstHeader(l).getValue(), equalTo("http://bar.com")); 38 assertThat(resp.getLastHeader("None"), nullValue()); 41 assertThat(resp.getLastHeader(l).getValue(), equalTo("http://zombo.com")); 51 assertThat(resp.containsHeader("X-Zombo-Com"), is(true)); 52 assertThat(resp.containsHeader("Location"), is(false)); 64 assertThat(it.hasNext(), is(true)); 65 assertThat(it.nextHeader().getValue(), equalTo("http://bar.com")) [all...] |