/external/robolectric/v1/src/test/java/com/xtremelabs/robolectric/shadows/ |
D | ViewGroupTest.java | 24 import static org.hamcrest.CoreMatchers.sameInstance; 85 assertThat(root.getLayoutAnimationListener(), sameInstance(animationListener)); in testLayoutAnimationListener() 93 assertThat(root.getChildAt(0), sameInstance(child1)); in testRemoveChildAt() 94 assertThat(root.getChildAt(1), sameInstance((View) child3)); in testRemoveChildAt() 105 assertThat(root.getChildAt(0), sameInstance(child1)); in testAddViewAt() 106 assertThat(root.getChildAt(1), sameInstance((View) child3)); in testAddViewAt() 107 assertThat(root.getChildAt(2), sameInstance(child2)); in testAddViewAt() 119 assertThat(root.findViewWithTag("tag1"), sameInstance(child1)); in shouldfindViewWithTag() 120 assertThat(root.findViewWithTag("tag2"), sameInstance(child2)); in shouldfindViewWithTag() 121 assertThat((ViewGroup) root.findViewWithTag("tag3"), sameInstance(child3)); in shouldfindViewWithTag() [all …]
|
D | SpannableStringTest.java | 5 import static org.hamcrest.CoreMatchers.sameInstance; 33 assertThat(spanStr.toString(), sameInstance(TEST_STRING)); in testToString() 57 assertThat((UnderlineSpan) spans[0], sameInstance(s2)); in testRemoveSpan() 75 assertThat((URLSpan) spans[0], sameInstance(s1)); in testGetSpans() 80 assertThat((UnderlineSpan) spans[0], sameInstance(s2)); in testGetSpans() 85 assertThat((UnderlineSpan) spans[0], sameInstance(s2)); in testGetSpans() 90 assertThat((URLSpan) spans[0], sameInstance(s1)); in testGetSpans() 126 assertThat((URLSpan) spans[0], sameInstance(s1)); in assertBothSpans() 128 assertThat((UnderlineSpan) spans[0], sameInstance(s2)); in assertBothSpans() 131 assertThat((UnderlineSpan) spans[1], sameInstance(s2)); in assertBothSpans() [all …]
|
D | ContextWrapperTest.java | 25 import static org.hamcrest.CoreMatchers.sameInstance; 115 assertThat(activity.getApplication(), sameInstance(activity.getApplication())); in shouldReturnSameApplicationEveryTime() 117 assertThat(activity.getApplication(), sameInstance(new Activity().getApplication())); in shouldReturnSameApplicationEveryTime() 123 … assertThat(activity.getApplicationContext(), sameInstance(activity.getApplicationContext())); in shouldReturnSameApplicationContextEveryTime() 125 …assertThat(activity.getApplicationContext(), sameInstance(new Activity().getApplicationContext())); in shouldReturnSameApplicationContextEveryTime() 131 assertThat(activity.getContentResolver(), sameInstance(activity.getContentResolver())); in shouldReturnSameContentResolverEveryTime() 133 … assertThat(activity.getContentResolver(), sameInstance(new Activity().getContentResolver())); in shouldReturnSameContentResolverEveryTime() 168 assertThat(contextWrapper.getBaseContext(), sameInstance((Context) baseContext)); in shouldReturnAContext() 173 …assertThat(activity.getSystemService(serviceName), sameInstance(activity.getSystemService(serviceN… in assertSameInstanceEveryTime() 175 …assertThat(activity.getSystemService(serviceName), sameInstance(new Activity().getSystemService(se… in assertSameInstanceEveryTime()
|
D | GalleryTest.java | 12 import static org.hamcrest.CoreMatchers.sameInstance; 34 assertThat((Gallery) listener.view, sameInstance(gallery)); in onKeyDown_dPadRightShouldTriggerKeyEventDPadRight() 35 assertThat(listener.event, sameInstance(event)); in onKeyDown_dPadRightShouldTriggerKeyEventDPadRight() 42 assertThat((Gallery)listener.view, sameInstance(gallery)); in onKeyDown_dPadLeftShouldTriggerKeyEventListener() 43 assertThat(listener.event, sameInstance(event)); in onKeyDown_dPadLeftShouldTriggerKeyEventListener()
|
D | DialogPreferenceTest.java | 17 import static org.hamcrest.CoreMatchers.sameInstance; 47 assertThat(shadow.getContext(), sameInstance(context)); in testConstructors() 48 assertThat(shadow.getAttrs(), sameInstance((AttributeSet) attrs)); in testConstructors() 53 assertThat(shadow.getContext(), sameInstance(context)); in testConstructors() 54 assertThat(shadow.getAttrs(), sameInstance((AttributeSet) attrs)); in testConstructors()
|
D | PreferenceTest.java | 7 import static org.hamcrest.CoreMatchers.sameInstance; 53 assertThat(shadow.getContext(), sameInstance(context)); in shouldConstruct() 54 assertThat(shadow.getAttrs(), sameInstance((AttributeSet)attrs)); in shouldConstruct() 59 assertThat(shadow.getContext(), sameInstance( context )); in shouldConstruct() 60 assertThat(shadow.getAttrs(), sameInstance((AttributeSet)attrs)); in shouldConstruct() 65 assertThat(shadow.getContext(), sameInstance( context )); in shouldConstruct() 132 assertThat(shadow.getDefaultValue(), sameInstance(defaultValue)); in shouldRememberDefaultValue() 193 assertThat(shadow.getOnPreferenceClickListener(), sameInstance(onPreferenceClickListener)); in shouldRememberOnClickListener() 218 assertThat(shadow.getCallChangeListenerValue(), sameInstance((Object)newValue)); in shouldCallChangeListener()
|
D | MapViewTest.java | 18 import static org.hamcrest.CoreMatchers.sameInstance; 48 assertThat(overlay1.lastMotionEvent, sameInstance(sourceEvent)); in shouldDispatchTouchEventsToOverlays() 60 assertThat(overlay1.lastMotionEvent, sameInstance(sourceEvent)); in shouldDispatchTouchEventsToOverlaysUntilEventIsConsumed() 61 assertThat(overlay2.lastMotionEvent, sameInstance(sourceEvent)); in shouldDispatchTouchEventsToOverlaysUntilEventIsConsumed() 72 assertThat(overlay1.lastMotionEvent, sameInstance(sourceEvent)); in shouldDispatchTouchEventsToMapViewIfNoOverlayConsumesEvent() 73 assertThat(overlay2.lastMotionEvent, sameInstance(sourceEvent)); in shouldDispatchTouchEventsToMapViewIfNoOverlayConsumesEvent() 74 assertThat(mapTouchListener.lastMotionEvent, sameInstance(sourceEvent)); in shouldDispatchTouchEventsToMapViewIfNoOverlayConsumesEvent()
|
D | PreferenceGroupTest.java | 5 import static org.hamcrest.CoreMatchers.sameInstance; 92 assertThat( group.getPreference(0), sameInstance(pref1)); in shouldGetPreference() 93 assertThat( group.getPreference(1), sameInstance(pref2)); in shouldGetPreference() 139 assertThat( group.findPreference(pref1.getKey()), sameInstance(pref1)); in shouldFindPreference() 140 assertThat( group.findPreference(pref2.getKey()), sameInstance(pref2)); in shouldFindPreference() 151 assertThat( group.findPreference(pref2.getKey()), sameInstance(pref2)); in shouldFindPreferenceRecursively()
|
D | AnimationSetTest.java | 40 assertThat(list.get(0), sameInstance(alpha)); in testAnimationList() 41 assertThat(list.get(1), sameInstance(translate)); in testAnimationList() 42 assertThat(list.get(2), sameInstance(rotate)); in testAnimationList()
|
D | ShadowBinderTest.java | 12 import static org.hamcrest.CoreMatchers.sameInstance; 24 assertThat(testBinder.data, sameInstance(data)); in transactCallsOnTransact() 25 assertThat(testBinder.reply, sameInstance(reply)); in transactCallsOnTransact()
|
D | FragmentManagerTest.java | 25 import static org.hamcrest.CoreMatchers.sameInstance; 51 assertThat(manager.findFragmentById(CONTAINER_VIEW_ID), sameInstance((Fragment) fragment)); in shouldFindFragmentById() 58 assertThat(manager.findFragmentByTag("tag1"), sameInstance((Fragment) fragment)); in shouldFindFragmentByTag() 95 assertThat(fragment.getView(), sameInstance(fragment.onCreateViewReturnValue)); in addFragment_shouldSetTheFragmentsView() 111 …assertThat(activity.findViewById(TestFragment.FRAGMENT_VIEW_ID), sameInstance(fragment.onCreateVie… in startFragment_shouldInsertTheFragmentViewIntoTheContainerView() 112 assertThat(fragmentViewParent, sameInstance((View) containerView)); in startFragment_shouldInsertTheFragmentViewIntoTheContainerView()
|
D | ListPreferenceTest.java | 16 import static org.hamcrest.CoreMatchers.sameInstance; 42 assertThat(listPreference.getEntries(), sameInstance(entries)); in shouldHaveEntries() 58 assertThat(listPreference.getEntryValues(), sameInstance(entryValues)); in shouldHaveEntryValues()
|
D | VideoViewTest.java | 4 import static org.hamcrest.CoreMatchers.sameInstance; 33 assertThat((TestPreparedListener)(shadowVideoView.getOnPreparedListener()), sameInstance(l)); in shouldSetOnPreparedListener() 41 assertThat((TestErrorListener)(shadowVideoView.getOnErrorListener()), sameInstance(l)); in shouldSetOnErrorListener() 49 … assertThat((TestCompletionListener)(shadowVideoView.getOnCompletionListener()), sameInstance(l)); in shouldSetOnCompletionListener()
|
D | AlertDialogTest.java | 45 … assertThat(shadowOf(ShadowAlertDialog.getLatestAlertDialog()), sameInstance(shadowAlertDialog)); in testBuilder() 46 assertThat(ShadowAlertDialog.getLatestAlertDialog(), sameInstance(alert)); in testBuilder() 54 assertThat(ShadowAlertDialog.getLatestAlertDialog(), sameInstance(dialog)); in getLatestAlertDialog_shouldReturnARealAlertDialog() 118 assertThat(builder.setCustomTitle(view), sameInstance(builder)); in shouldSetCustomTitleView() 225 … assertThat(shadowOf(ShadowAlertDialog.getLatestAlertDialog()), sameInstance(shadowAlertDialog)); in testBuilderWithItemArrayViaResourceId() 226 assertThat(ShadowAlertDialog.getLatestAlertDialog(), sameInstance(alert)); in testBuilderWithItemArrayViaResourceId() 298 assertThat(ShadowAlertDialog.getLatestAlertDialog(), sameInstance(alert)); in shouldReturnTheIndexOfTheCheckedItemInASingleChoiceDialog() 358 assertThat(dialog.findViewById(99), sameInstance(view)); in shouldFindViewsByIdIfAViewIsSet()
|
D | WebViewTest.java | 72 assertThat(shadowWebView.getWebViewClient(), sameInstance(webViewClient)); in shouldRecordWebViewClient() 80 assertThat(shadowWebView.getWebChromeClient(), sameInstance(webChromeClient)); in shouldRecordWebChromeClient() 94 assertThat(shadowWebView.getPictureListener(), sameInstance(pictureListener)); in shouldRecordPictureListener() 104 assertThat(shadowWebView.getJavascriptInterface(name), sameInstance(obj)); in shouldRecordJavascriptInteraces()
|
D | RemoteCallbackListTest.java | 12 import static org.hamcrest.CoreMatchers.sameInstance; 25 assertThat(fooRemoteCallbackList.getBroadcastItem(0), sameInstance(callback)); in testBasicWiring()
|
D | SQLiteOpenHelperTest.java | 15 import static org.hamcrest.CoreMatchers.sameInstance; 48 assertThat(db1, sameInstance(db2)); in testSameDBInstanceSubsequentGetReadableDatabase() 70 assertThat(db1, sameInstance(db2)); in testSameDBInstanceSubsequentGetWritableDatabase()
|
D | CameraTest.java | 22 import static org.hamcrest.CoreMatchers.sameInstance; 83 assertThat(shadowCamera.getPreviewDisplay(), sameInstance(previewSurfaceHolder)); in testSetPreviewDisplay() 117 assertThat(callback.camera, sameInstance(camera)); in testSetPreviewCallbacks() 130 assertThat(callback.camera, sameInstance(camera)); in testSetOneShotPreviewCallbacks() 143 assertThat(callback.camera, sameInstance(camera)); in testPreviewCallbacksWithBuffers()
|
D | CursorAdapterTest.java | 6 import static org.hamcrest.CoreMatchers.sameInstance; 66 assertThat(adapter.getCursor(), sameInstance(curs)); in testChangeCursor() 98 assertThat(adapter.getView(i, null, null), sameInstance(views.get(i))); in testGetView()
|
D | ListViewTest.java | 9 import static org.hamcrest.CoreMatchers.sameInstance; 105 assertThat(shadowOf(listView).getHeaderViews().get(0), sameInstance(view0)); in addHeaderView_ShouldRecordHeaders() 106 assertThat(shadowOf(listView).getHeaderViews().get(1), sameInstance(view1)); in addHeaderView_ShouldRecordHeaders() 107 assertThat(shadowOf(listView).getHeaderViews().get(2), sameInstance(view2)); in addHeaderView_ShouldRecordHeaders() 108 assertThat(shadowOf(listView).getHeaderViews().get(3), sameInstance(view3)); in addHeaderView_ShouldRecordHeaders() 144 assertThat(shadowOf(listView).getFooterViews().get(0), sameInstance(view0)); in addFooterView_ShouldRecordFooters() 145 assertThat(shadowOf(listView).getFooterViews().get(1), sameInstance(view1)); in addFooterView_ShouldRecordFooters() 217 assertThat(item1, sameInstance(listView.getChildAt(1))); in findItemContainingText_shouldFindChildByString()
|
D | PreferenceScreenTest.java | 14 import static org.hamcrest.CoreMatchers.sameInstance; 40 assertThat(screen.getDialog(), sameInstance(dialog)); in shouldSetDialog()
|
D | ExpandableListViewTest.java | 11 import static org.hamcrest.CoreMatchers.sameInstance; 44 assertThat(myOnChildClickListener.expandableListView, sameInstance(expandableListView)); in shouldPassTheViewToTheClickListener()
|
D | ViewTest.java | 220 assertThat(view.getAnimation(), sameInstance(anim)); in shouldSetAnimation() 244 assertThat(view.findViewWithTag("tagged"), sameInstance(view)); in shouldFindViewWithTag() 255 assertThat(view.findViewWithTag("blarg"), sameInstance(view)); in shouldFindViewWithTag_whenViewOverridesGetTag() 282 assertThat(view.getViewTreeObserver(), sameInstance(observer)); in getViewTreeObserver_shouldReturnTheSameObserverFromMultipleCalls() 290 assertThat(touchableView.event, sameInstance(event)); in dispatchTouchEvent_sendsMotionEventToOnTouchEvent() 292 assertThat(shadowOf(view).getLastTouchEvent(), sameInstance(event)); in dispatchTouchEvent_sendsMotionEventToOnTouchEvent() 318 assertThat(shadowOf(view).getLastTouchEvent(), sameInstance(event)); in dispatchTouchEvent_listensToFalseFromListener()
|
/external/hamcrest/hamcrest-core/src/test/java/org/hamcrest/core/ |
D | IsSameTest.java | 7 import static org.hamcrest.core.IsSame.sameInstance; 15 Matcher<String> matcher = sameInstance("irrelevant"); in copesWithNullsAndUnknownTypes() 24 Matcher<Object> matcher = sameInstance(o1); in evaluatesToTrueIfArgumentIsReferenceToASpecifiedObject() 41 assertDescription("sameInstance(\"ARG\")", sameInstance("ARG")); in returnsReadableDescriptionFromToString() 46 assertDescription("sameInstance(null)", sameInstance(null)); in returnsReadableDescriptionFromToStringWhenInitialisedWithNull()
|
/external/robolectric/v1/src/test/java/com/xtremelabs/robolectric/res/ |
D | RobolectricPackageManagerTest.java | 120 assertThat(rpm.resolveActivity(i, 0), sameInstance(info)); in resolveActivity__Match() 139 assertThat(rpm.resolveService(i, 0), sameInstance(info)); in resolveService__Match() 156 assertThat(rpm.getActivityIcon(i), sameInstance(d)); in queryActivityIcons__Match() 157 assertThat(rpm.getActivityIcon(i.getComponent()), sameInstance(d)); in queryActivityIcons__Match()
|