blob: 29c96cfa36ce783e1960ac6a84def247fea644b2 [file] [log] [blame]
package org.robolectric.shadows;
import android.widget.ScrollView;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.Robolectric;
import org.robolectric.TestRunners;
import static junit.framework.Assert.assertEquals;
@RunWith(TestRunners.WithDefaults.class)
public class ScrollViewTest {
@Test
public void shouldSmoothScrollTo() throws Exception {
ScrollView scrollView = new ScrollView(Robolectric.application);
scrollView.smoothScrollTo(7, 6);
assertEquals(7, scrollView.getScrollX());
assertEquals(6, scrollView.getScrollY());
}
}