Home
last modified time | relevance | path

Searched refs:equalTo (Results 1 – 25 of 212) sorted by relevance

123456789

/external/robolectric/v1/src/test/java/com/xtremelabs/robolectric/shadows/
DAbstractCursorTest.java3 import static org.hamcrest.CoreMatchers.equalTo;
34 assertThat(cursor.moveToFirst(), equalTo(true)); in testMoveToFirst()
35 assertThat(cursor.getCount(), equalTo(1)); in testMoveToFirst()
40 assertThat(cursor.moveToFirst(), equalTo(false)); in testMoveToFirstEmptyList()
41 assertThat(cursor.getCount(), equalTo(0)); in testMoveToFirstEmptyList()
49 assertThat(cursor.moveToLast(), equalTo(true)); in testMoveToLast()
50 assertThat(cursor.getCount(), equalTo(2)); in testMoveToLast()
55 assertThat(cursor.moveToLast(), equalTo(false)); in testMoveToLastEmptyList()
56 assertThat(cursor.getCount(), equalTo(0)); in testMoveToLastEmptyList()
64 assertThat(cursor.moveToFirst(), equalTo(true)); in testGetPosition()
[all …]
DSQLiteCursorTest.java18 import static org.hamcrest.CoreMatchers.equalTo;
66 assertThat(cursor.getColumnIndex("id"), equalTo(0)); in testGetColumnIndex()
67 assertThat(cursor.getColumnIndex("name"), equalTo(1)); in testGetColumnIndex()
72 assertThat(cursor.getColumnIndex("Fred"), equalTo(-1)); in testGetColumnIndexNotFound()
79 assertThat(cursor.getColumnIndex("id"), equalTo(0)); in testGetColumnIndexEmpty()
80 assertThat(cursor.getColumnIndex("name"), equalTo(1)); in testGetColumnIndexEmpty()
85 assertThat(cursor.getColumnIndexOrThrow("id"), equalTo(0)); in testGetColumnIndexOrThrow()
86 assertThat(cursor.getColumnIndexOrThrow("name"), equalTo(1)); in testGetColumnIndexOrThrow()
98 assertThat(cursor.getColumnIndexOrThrow("name"), equalTo(1)); in testGetColumnIndexOrThrowEmpty()
110 assertThat(cursor.moveToFirst(), equalTo(true)); in testMoveToFirst()
[all …]
DMediaRecorderTest.java30 assertThat(shadowMediaRecorder.getAudioChannels(), not(equalTo(2))); in testAudioChannels()
32 assertThat(shadowMediaRecorder.getAudioChannels(), equalTo(2)); in testAudioChannels()
37 …assertThat(shadowMediaRecorder.getAudioEncoder(), not(equalTo(MediaRecorder.AudioEncoder.AMR_NB))); in testAudioEncoder()
38 …assertThat(shadowMediaRecorder.getState(), not(equalTo(ShadowMediaRecorder.STATE_DATA_SOURCE_CONFI… in testAudioEncoder()
40 … assertThat(shadowMediaRecorder.getAudioEncoder(), equalTo(MediaRecorder.AudioEncoder.AMR_NB)); in testAudioEncoder()
41 …assertThat(shadowMediaRecorder.getState(), equalTo(ShadowMediaRecorder.STATE_DATA_SOURCE_CONFIGURE… in testAudioEncoder()
46 assertThat(shadowMediaRecorder.getAudioEncodingBitRate(), not(equalTo(128000))); in testAudioEncodingBitRate()
48 assertThat(shadowMediaRecorder.getAudioEncodingBitRate(), equalTo(128000)); in testAudioEncodingBitRate()
53 assertThat(shadowMediaRecorder.getAudioSamplingRate(), not(equalTo(22050))); in testAudioSamplingRate()
55 assertThat(shadowMediaRecorder.getAudioSamplingRate(), equalTo(22050)); in testAudioSamplingRate()
[all …]
DDatabaseTestBase.java18 import static org.hamcrest.CoreMatchers.equalTo;
95 assertThat(cursor.moveToFirst(), equalTo(true)); in testInsertAndQuery()
100 assertThat(stringValueFromDatabase, equalTo(stringColumnValue)); in testInsertAndQuery()
101 assertThat(byteValueFromDatabase, equalTo(byteColumnValue)); in testInsertAndQuery()
118 assertThat(cursor.moveToFirst(), equalTo(true)); in testInsertAndRawQuery()
123 assertThat(stringValueFromDatabase, equalTo(stringColumnValue)); in testInsertAndRawQuery()
124 assertThat(byteValueFromDatabase, equalTo(byteColumnValue)); in testInsertAndRawQuery()
143 assertThat(cursor.moveToFirst(), equalTo(true)); in testInsertOrThrow()
146 assertThat(stringValueFromDatabase, equalTo(stringColumnValue)); in testInsertOrThrow()
147 assertThat(byteValueFromDatabase, equalTo(byteColumnValue)); in testInsertOrThrow()
[all …]
DCameraParametersTest.java14 import static org.hamcrest.CoreMatchers.equalTo;
34 assertThat(shadowParameters.getPictureHeight(), not(equalTo(600))); in testPictureSize()
35 assertThat(shadowParameters.getPictureWidth(), not(equalTo(800))); in testPictureSize()
38 assertThat(pictureSize.width, equalTo(800)); in testPictureSize()
39 assertThat(pictureSize.height, equalTo(600)); in testPictureSize()
40 assertThat(shadowParameters.getPictureHeight(), equalTo(600)); in testPictureSize()
41 assertThat(shadowParameters.getPictureWidth(), equalTo(800)); in testPictureSize()
48 assertThat(fpsRange[1], not(equalTo(15))); in testPreviewFpsRange()
49 assertThat(fpsRange[0], not(equalTo(25))); in testPreviewFpsRange()
52 assertThat(fpsRange[1], equalTo(25)); in testPreviewFpsRange()
[all …]
DMatrixCursorTest.java3 import static org.hamcrest.CoreMatchers.equalTo;
35 assertThat(cursor.getCount(), equalTo(2)); in shouldAddRows()
39 assertThat(cursor.getString(0), equalTo("foo")); in shouldAddRows()
40 assertThat(cursor.getLong(1), equalTo(10L)); in shouldAddRows()
41 assertThat(cursor.getFloat(2), equalTo(0.1f)); in shouldAddRows()
45 assertThat(cursor.getString(0), equalTo("baz")); in shouldAddRows()
46 assertThat(cursor.getLong(1), equalTo(20L)); in shouldAddRows()
56 assertThat(cursor.getColumnCount(), equalTo(3)); in shouldDefineColumnNames()
58 assertThat(cursor.getColumnName(0), equalTo("a")); in shouldDefineColumnNames()
59 assertThat(cursor.getColumnName(1), equalTo("b")); in shouldDefineColumnNames()
[all …]
DAnimationTest.java34 assertThat(listener.wasStartCalled, equalTo(false)); in startShouldInvokeStartCallback()
36 assertThat(listener.wasStartCalled, equalTo(true)); in startShouldInvokeStartCallback()
37 assertThat(listener.wasEndCalled, equalTo(false)); in startShouldInvokeStartCallback()
38 assertThat(listener.wasRepeatCalled, equalTo(false)); in startShouldInvokeStartCallback()
43 assertThat(listener.wasEndCalled, equalTo(false)); in cancelShouldInvokeEndCallback()
45 assertThat(listener.wasStartCalled, equalTo(false)); in cancelShouldInvokeEndCallback()
46 assertThat(listener.wasEndCalled, equalTo(true)); in cancelShouldInvokeEndCallback()
47 assertThat(listener.wasRepeatCalled, equalTo(false)); in cancelShouldInvokeEndCallback()
52 assertThat(listener.wasRepeatCalled, equalTo(false)); in invokeRepeatShouldInvokeRepeatCallback()
54 assertThat(listener.wasStartCalled, equalTo(false)); in invokeRepeatShouldInvokeRepeatCallback()
[all …]
DStatFsTest.java3 import static org.hamcrest.CoreMatchers.equalTo;
21 assertThat(statsFs.getBlockCount(), equalTo(100)); in shouldRegisterStats()
22 assertThat(statsFs.getFreeBlocks(), equalTo(20)); in shouldRegisterStats()
23 assertThat(statsFs.getAvailableBlocks(), equalTo(10)); in shouldRegisterStats()
24 assertThat(statsFs.getBlockSize(), equalTo(ShadowStatFs.BLOCK_SIZE)); in shouldRegisterStats()
32 assertThat(statsFs.getBlockCount(), equalTo(100)); in shouldRegisterStatsWithFile()
33 assertThat(statsFs.getFreeBlocks(), equalTo(20)); in shouldRegisterStatsWithFile()
34 assertThat(statsFs.getAvailableBlocks(), equalTo(10)); in shouldRegisterStatsWithFile()
35 assertThat(statsFs.getBlockSize(), equalTo(ShadowStatFs.BLOCK_SIZE)); in shouldRegisterStatsWithFile()
41 assertThat(statsFs.getBlockCount(), equalTo(0)); in shouldResetStateBetweenTests()
[all …]
DMessageTest.java3 import static org.hamcrest.CoreMatchers.equalTo;
28 assertThat(m.getData(), equalTo(b)); in testGetData()
38 assertThat(m.peekData(), equalTo(b)); in testPeekData()
46 assertThat(m.getTarget(), equalTo(h)); in testGetTarget()
62 assertThat(m2.arg1, equalTo(m.arg1)); in testCopyFrom()
63 assertThat(m2.arg2, equalTo(m.arg2)); in testCopyFrom()
64 assertThat(m2.obj, equalTo(m.obj)); in testCopyFrom()
65 assertThat(m2.what, equalTo(m.what)); in testCopyFrom()
66 assertThat(m2.getData(), equalTo(m.getData())); in testCopyFrom()
80 assertThat(m.getTarget(), equalTo(h)); in testObtainWithHandler()
[all …]
DPreferenceGroupTest.java3 import static org.hamcrest.CoreMatchers.equalTo;
55 assertThat( group.getPreferenceCount(), equalTo(0)); in shouldAddPreferences()
58 assertThat( group.addPreference(pref1), equalTo(true)); in shouldAddPreferences()
59 assertThat( group.getPreferenceCount(), equalTo(1)); in shouldAddPreferences()
62 assertThat( group.addPreference(pref1), equalTo(true)); in shouldAddPreferences()
63 assertThat( group.getPreferenceCount(), equalTo(1)); in shouldAddPreferences()
66 assertThat( group.addPreference(pref2), equalTo(true)); in shouldAddPreferences()
67 assertThat( group.getPreferenceCount(), equalTo(2)); in shouldAddPreferences()
72 assertThat( group.getPreferenceCount(), equalTo(0)); in shouldAddItemFromInflater()
76 assertThat( group.getPreferenceCount(), equalTo(1)); in shouldAddItemFromInflater()
[all …]
DHandlerTest.java16 import static org.hamcrest.CoreMatchers.equalTo;
103 assertThat(scratchRunnable.wasRun, equalTo(true)); in testPostAndIdleMainLooper()
110 assertThat(scratchRunnable.wasRun, equalTo(false)); in postDelayedThenIdleMainLooper_shouldNotRunRunnable()
117 assertThat(scratchRunnable.wasRun, equalTo(true)); in testPostDelayedThenRunMainLooperOneTask()
130 assertThat(scratchRunnable.wasRun, equalTo(false)); in testRemoveCallbacks()
137 assertThat(scratchRunnable.wasRun, equalTo(true)); in testPostDelayedThenRunMainLooperToNextTask_shouldRunOneTask()
149 assertThat(task1.wasRun, equalTo(true)); in testPostDelayedTwiceThenRunMainLooperToNextTask_shouldRunMultipleTasks()
150 assertThat(task2.wasRun, equalTo(true)); in testPostDelayedTwiceThenRunMainLooperToNextTask_shouldRunMultipleTasks()
162 assertThat(task1.wasRun, equalTo(true)); in testPostDelayedTwiceThenRunMainLooperOneTask_shouldRunOnlyOneTask()
163 assertThat(task2.wasRun, equalTo(false)); in testPostDelayedTwiceThenRunMainLooperOneTask_shouldRunOnlyOneTask()
[all …]
DTranslateAnimationTest.java11 import static org.hamcrest.CoreMatchers.equalTo;
28 assertThat(shadow.getFromXType(), equalTo(1)); in animationParametersFromConstructor()
29 assertThat(shadow.getFromXValue(), equalTo(2f)); in animationParametersFromConstructor()
30 assertThat(shadow.getToXType(), equalTo(3)); in animationParametersFromConstructor()
31 assertThat(shadow.getToXValue(), equalTo(4f)); in animationParametersFromConstructor()
32 assertThat(shadow.getFromYType(), equalTo(5)); in animationParametersFromConstructor()
33 assertThat(shadow.getFromYValue(), equalTo(6f)); in animationParametersFromConstructor()
34 assertThat(shadow.getToYType(), equalTo(7)); in animationParametersFromConstructor()
35 assertThat(shadow.getToYValue(), equalTo(8f)); in animationParametersFromConstructor()
43 assertThat(shadow2.getFromXType(), equalTo(defType)); in animationParametersFromConstructor2()
[all …]
DSQLiteStatementTest.java16 import static org.hamcrest.CoreMatchers.equalTo;
49 assertThat(pkeyOne, equalTo(1L)); in testExecuteInsert()
50 assertThat(pkeyTwo, equalTo(2L)); in testExecuteInsert()
54 assertThat(resultSet.next(), equalTo(true)); in testExecuteInsert()
55 assertThat(resultSet.getInt(1), equalTo(2)); in testExecuteInsert()
59 assertThat(resultSet.next(), equalTo(true)); in testExecuteInsert()
60 assertThat(resultSet.getInt(1), equalTo(1)); in testExecuteInsert()
61 assertThat(resultSet.getString(2), equalTo("Leg Press")); in testExecuteInsert()
62 assertThat(resultSet.getInt(3), equalTo(0)); in testExecuteInsert()
63 assertThat(resultSet.next(), equalTo(true)); in testExecuteInsert()
[all …]
DWifiConfigurationTest.java10 import static org.hamcrest.CoreMatchers.equalTo;
45 assertThat(copy.networkId, equalTo(1)); in shouldCopy()
46 assertThat(copy.SSID, equalTo("SSID")); in shouldCopy()
47 assertThat(copy.BSSID, equalTo("BSSID")); in shouldCopy()
48 assertThat(copy.preSharedKey, equalTo("preSharedKey")); in shouldCopy()
49 assertThat(copy.status, equalTo(666)); in shouldCopy()
50 assertThat(copy.wepTxKeyIndex, equalTo(777)); in shouldCopy()
51 assertThat(copy.priority, equalTo(2)); in shouldCopy()
52 assertThat(copy.hiddenSSID, equalTo(true)); in shouldCopy()
53 assertThat(copy.allowedKeyManagement.get(1), equalTo(true)); in shouldCopy()
[all …]
DTextUtilsTest.java19 equalTo("aAbBcCd")); in testExpandTemplate()
24 assertThat(TextUtils.isEmpty(null), equalTo(true)); in testIsEmpty()
25 assertThat(TextUtils.isEmpty(""), equalTo(true)); in testIsEmpty()
26 assertThat(TextUtils.isEmpty(" "), equalTo(false)); in testIsEmpty()
27 assertThat(TextUtils.isEmpty("123"), equalTo(false)); in testIsEmpty()
31 assertThat(TextUtils.join(",", new String[] { "1" }), equalTo("1")); in testJoin()
32 assertThat(TextUtils.join(",", new String[] { "1", "2", "3" }), equalTo("1,2,3")); in testJoin()
33 assertThat(TextUtils.join(",", Arrays.asList("1", "2", "3")), equalTo("1,2,3")); in testJoin()
38 assertThat(TextUtils.isDigitsOnly("123456"), equalTo(true)); in testIsDigitsOnly()
39 assertThat(TextUtils.isDigitsOnly("124a56"), equalTo(false)); in testIsDigitsOnly()
[all …]
DWebViewTest.java36 assertThat(shadowOf(webView).getLastLoadedUrl(), equalTo("http://example.com")); in shouldRecordLastLoadedUrl()
43 assertThat(lastLoadData.data, equalTo("<html><body><h1>Hi</h1></body></html>")); in shouldRecordLastLoadedData()
44 assertThat(lastLoadData.mimeType, equalTo("text/html")); in shouldRecordLastLoadedData()
45 assertThat(lastLoadData.encoding, equalTo("utf-8")); in shouldRecordLastLoadedData()
52 assertThat(lastLoadData.baseUrl, equalTo("base/url")); in shouldRecordLastLoadDataWithBaseURL()
53 assertThat(lastLoadData.data, equalTo("<html><body><h1>Hi</h1></body></html>")); in shouldRecordLastLoadDataWithBaseURL()
54 assertThat(lastLoadData.mimeType, equalTo("text/html")); in shouldRecordLastLoadDataWithBaseURL()
55 assertThat(lastLoadData.encoding, equalTo("utf-8")); in shouldRecordLastLoadDataWithBaseURL()
56 assertThat(lastLoadData.historyUrl, equalTo("history/url")); in shouldRecordLastLoadDataWithBaseURL()
116 assertThat(shadowWebView.getRunFlag(), equalTo(false)); in shouldStartPostRun()
[all …]
DDefaultRequestDirectorTest.java34 import static org.hamcrest.core.IsEqual.equalTo;
69 assertThat(response.getStatusLine().getStatusCode(), equalTo(200)); in shouldGetHttpResponseFromExecute()
70 …assertThat(Strings.fromStream(response.getEntity().getContent()), equalTo("a happy response body")… in shouldGetHttpResponseFromExecute()
83 assertThat(response.getStatusLine().getStatusCode(), equalTo(200)); in shouldPreferPendingResponses()
84 …assertThat(Strings.fromStream(response.getEntity().getContent()), equalTo("a happy response body")… in shouldPreferPendingResponses()
95 assertThat(response.getStatusLine().getStatusCode(), equalTo(200)); in shouldReturnRequestsByRule()
96 …assertThat(Strings.fromStream(response.getEntity().getContent()), equalTo("a cheery response body"… in shouldReturnRequestsByRule()
108 assertThat(response.getStatusLine().getStatusCode(), equalTo(404)); in shouldReturnRequestsByRule_MatchingMethod()
117 assertThat(getResponse.getStatusLine().getStatusCode(), equalTo(200)); in shouldReturnRequestsByRule_AnyMethod()
118 …assertThat(Strings.fromStream(getResponse.getEntity().getContent()), equalTo("a cheery response bo… in shouldReturnRequestsByRule_AnyMethod()
[all …]
DContentResolverTest.java5 import static org.hamcrest.CoreMatchers.equalTo;
59 … assertThat(contentResolver.insert(EXTERNAL_CONTENT_URI, new ContentValues()), equalTo(uri21)); in insert_shouldReturnIncreasingUris()
60 … assertThat(contentResolver.insert(EXTERNAL_CONTENT_URI, new ContentValues()), equalTo(uri22)); in insert_shouldReturnIncreasingUris()
69 …assertThat(shadowContentResolver.getInsertStatements().get(0).getUri(), equalTo(EXTERNAL_CONTENT_U… in insert_shouldTrackInsertStatements()
70 …ontentResolver.getInsertStatements().get(0).getContentValues().getAsString("foo"), equalTo("bar")); in insert_shouldTrackInsertStatements()
76 …ntResolver.getInsertStatements().get(1).getContentValues().getAsString("hello"), equalTo("world")); in insert_shouldTrackInsertStatements()
85 …assertThat(shadowContentResolver.getUpdateStatements().get(0).getUri(), equalTo(EXTERNAL_CONTENT_U… in insert_shouldTrackUpdateStatements()
86 …ontentResolver.getUpdateStatements().get(0).getContentValues().getAsString("foo"), equalTo("bar")); in insert_shouldTrackUpdateStatements()
87 … assertThat(shadowContentResolver.getUpdateStatements().get(0).getWhere(), equalTo("robolectric")); in insert_shouldTrackUpdateStatements()
88 …assertThat(shadowContentResolver.getUpdateStatements().get(0).getSelectionArgs(), equalTo(new Stri… in insert_shouldTrackUpdateStatements()
[all …]
/external/robolectric/v1/src/test/java/android/webkit/
DTestWebSettingsTest.java11 import static org.hamcrest.CoreMatchers.equalTo;
28 assertThat(webSettings.getAllowFileAccess(), equalTo(true)); in testDefaults()
29 assertThat(webSettings.getBlockNetworkImage(), equalTo(false)); in testDefaults()
30 assertThat(webSettings.getBlockNetworkLoads(), equalTo(false)); in testDefaults()
31 assertThat(webSettings.getBuiltInZoomControls(), equalTo(true)); in testDefaults()
32 assertThat(webSettings.getDatabaseEnabled(), equalTo(false)); in testDefaults()
33 assertThat(webSettings.getDomStorageEnabled(), equalTo(false)); in testDefaults()
34 assertThat(webSettings.getJavaScriptEnabled(), equalTo(false)); in testDefaults()
35 assertThat(webSettings.getLightTouchEnabled(), equalTo(false)); in testDefaults()
36 assertThat(webSettings.getLoadWithOverviewMode(), equalTo(false)); in testDefaults()
[all …]
/external/hamcrest/hamcrest-library/src/test/java/org/hamcrest/collection/
DIsArrayTest.java9 import static org.hamcrest.core.IsEqual.equalTo;
16 return array(equalTo("irrelevant")); in createMatcher()
21 array(equalTo("a"), equalTo("b"), equalTo("c")), new String[]{"a", "b", "c"}); in testMatchesAnArrayThatMatchesAllTheElementMatchers()
26 array(equalTo("a"), equalTo("b")), new String[]{"b", "c"}); in testDoesNotMatchAnArrayWhenElementsDoNotMatch()
31 array(equalTo("a"), equalTo("b")), new String[]{"a", "b", "c"}); in testDoesNotMatchAnArrayOfDifferentSize()
33 array(equalTo("a"), equalTo("b")), new String[]{"a"}); in testDoesNotMatchAnArrayOfDifferentSize()
38 array(equalTo("a")), null); in testDoesNotMatchNull()
42 assertDescription("[\"a\", \"b\"]", array(equalTo("a"), equalTo("b"))); in testHasAReadableDescription()
46 …assertMismatchDescription("element <0> was \"c\"", array(equalTo("a"), equalTo("b")), new String[]… in testHasAReadableMismatchDescriptionUsing()
57 …assertMismatchDescription("element <0> didn't match", array(m, equalTo("b")), new String[]{"c", "b… in testHasAReadableMismatchDescriptionUsingCustomMatchers()
DIsCollectionWithSizeTest.java13 import static org.hamcrest.core.IsEqual.equalTo;
23 assertMatches("correct size", hasSize(equalTo(2)), asList(null, null)); in testMatchesWhenSizeIsCorrect()
24 …assertMismatchDescription("collection size was <3>", hasSize(equalTo(2)), asList(null, null, null)… in testMatchesWhenSizeIsCorrect()
29 assertMatches("correct size", hasSize(equalTo(2)), list); in testMatchesCollectionWhenSizeIsCorrectUsingObjectElementType()
30 assertMismatchDescription("collection size was <2>", hasSize(equalTo(3)), list); in testMatchesCollectionWhenSizeIsCorrectUsingObjectElementType()
35 assertMatches("correct size", hasSize(equalTo(2)), list); in testMatchesCollectionWhenSizeIsCorrectUsingStringElementType()
36 assertMismatchDescription("collection size was <2>", hasSize(equalTo(3)), list); in testMatchesCollectionWhenSizeIsCorrectUsingStringElementType()
41 assertMatches("correct size", hasSize(equalTo(2)), list); in testMatchesCollectionWhenSizeIsCorrectUsingWildcardElementType()
42 assertMismatchDescription("collection size was <2>", hasSize(equalTo(3)), list); in testMatchesCollectionWhenSizeIsCorrectUsingWildcardElementType()
47 assertMatches("correct size", hasSize(equalTo(2)), list); in testMatchesListWhenSizeIsCorrectUsingObjectElementType()
[all …]
DIsMapWithSizeTest.java11 import static org.hamcrest.core.IsEqual.equalTo;
21 assertMatches("correct size", aMapWithSize(equalTo(2)), mapWithKeys("a", "b")); in testMatchesWhenSizeIsCorrect()
22 …assertMismatchDescription("map size was <3>", aMapWithSize(equalTo(2)), mapWithKeys("a", "b", "c")… in testMatchesWhenSizeIsCorrect()
27 assertMatches("correct size", aMapWithSize(equalTo(2)), map); in testMatchesMapWhenSizeIsCorrectUsingObjectElementType()
28 assertMismatchDescription("map size was <2>", aMapWithSize(equalTo(3)), map); in testMatchesMapWhenSizeIsCorrectUsingObjectElementType()
33 assertMatches("correct size", aMapWithSize(equalTo(2)), map); in testMatchesMapWhenSizeIsCorrectUsingStringElementType()
34 assertMismatchDescription("map size was <2>", aMapWithSize(equalTo(3)), map); in testMatchesMapWhenSizeIsCorrectUsingStringElementType()
39 assertMatches("correct size", aMapWithSize(equalTo(2)), map); in testMatchesMapWhenSizeIsCorrectUsingWildcardElementType()
40 assertMismatchDescription("map size was <2>", aMapWithSize(equalTo(3)), map); in testMatchesMapWhenSizeIsCorrectUsingWildcardElementType()
45 assertMatches("correct size", aMapWithSize(equalTo(2)), map); in testMatchesListWhenSizeIsCorrectUsingObjectElementType()
[all …]
DIsArrayContainingInAnyOrderTest.java7 import static org.hamcrest.core.IsEqual.equalTo;
14 return arrayContainingInAnyOrder(equalTo(1), equalTo(2)); in createMatcher()
19 … assertDescription("[<1>, <2>] in any order", arrayContainingInAnyOrder(equalTo(1), equalTo(2))); in testHasAReadableDescription()
31 …assertMatches("in order", arrayContainingInAnyOrder(equalTo(1), equalTo(2), equalTo(3)), new Integ… in testAppliesMatchersInAnyOrder()
32 …assertMatches("out of order", arrayContainingInAnyOrder(equalTo(1), equalTo(2), equalTo(3)), new I… in testAppliesMatchersInAnyOrder()
33 assertMatches("single", arrayContainingInAnyOrder(equalTo(1)), new Integer[] {1}); in testAppliesMatchersInAnyOrder()
/external/robolectric/v1/src/test/java/com/xtremelabs/robolectric/tester/android/content/
DTestSharedPreferencesTest.java7 import static org.hamcrest.CoreMatchers.equalTo;
46 assertThat(anotherSharedPreferences.getFloat("float", 666f), equalTo(1.1f)); in commit_shouldStoreValues()
47 assertThat(anotherSharedPreferences.getInt("int", 666), equalTo(2)); in commit_shouldStoreValues()
48 assertThat(anotherSharedPreferences.getLong("long", 666l), equalTo(3l)); in commit_shouldStoreValues()
49 assertThat(anotherSharedPreferences.getString("string", "wacka wa"), equalTo("foobar")); in commit_shouldStoreValues()
56 assertThat(all.size(), equalTo(5)); in getAll_shouldReturnAllValues()
57 assertThat((Integer) all.get("int"), equalTo(2)); in getAll_shouldReturnAllValues()
74 assertThat(anotherSharedPreferences.getFloat("float", 666f), equalTo(1.1f)); in commit_shouldRemoveValuesThenSetValues()
75 assertThat(anotherSharedPreferences.getInt("int", 666), equalTo(2)); in commit_shouldRemoveValuesThenSetValues()
76 assertThat(anotherSharedPreferences.getLong("long", 666l), equalTo(3l)); in commit_shouldRemoveValuesThenSetValues()
[all …]
/external/robolectric/v1/src/test/java/com/xtremelabs/robolectric/util/
DDatabaseConfigTest.java12 import static org.hamcrest.CoreMatchers.equalTo;
25 … assertThat(DatabaseConfig.getDatabaseMap().getClass().getName(), equalTo(H2Map.class.getName())); in testSettingDatabaseMapLoadsCorrectly()
26 assertThat(DatabaseConfig.isMapLoaded(), equalTo(false)); in testSettingDatabaseMapLoadsCorrectly()
28 assertThat(DatabaseConfig.isMapLoaded(), equalTo(true)); in testSettingDatabaseMapLoadsCorrectly()
29 assertThat(DatabaseConfig.getResultSetType(), equalTo(ResultSet.TYPE_SCROLL_INSENSITIVE)); in testSettingDatabaseMapLoadsCorrectly()
33 assertThat(DatabaseConfig.isMapLoaded(), equalTo(false)); in testSettingDatabaseMapLoadsCorrectly()
34 assertThat(DatabaseConfig.getDatabaseMap(), equalTo((DatabaseMap) ForwardOnlyMap)); in testSettingDatabaseMapLoadsCorrectly()
36 assertThat(DatabaseConfig.isMapLoaded(), equalTo(true)); in testSettingDatabaseMapLoadsCorrectly()
37 …assertThat(DatabaseConfig.getDatabaseMap().getClass().getName(), equalTo(H2Map_TypeForwardOnly.cla… in testSettingDatabaseMapLoadsCorrectly()
38 assertThat(DatabaseConfig.getResultSetType(), equalTo(ResultSet.TYPE_FORWARD_ONLY)); in testSettingDatabaseMapLoadsCorrectly()
[all …]

123456789