1 package org.robolectric.shadows; 2 3 import static org.junit.Assert.assertEquals; 4 5 import android.widget.ScrollView; 6 import org.junit.Test; 7 import org.junit.runner.RunWith; 8 import org.robolectric.RobolectricTestRunner; 9 import org.robolectric.RuntimeEnvironment; 10 11 @RunWith(RobolectricTestRunner.class) 12 public class ShadowScrollViewTest { 13 @Test shouldSmoothScrollTo()14 public void shouldSmoothScrollTo() throws Exception { 15 ScrollView scrollView = new ScrollView(RuntimeEnvironment.application); 16 scrollView.smoothScrollTo(7, 6); 17 18 assertEquals(7, scrollView.getScrollX()); 19 assertEquals(6, scrollView.getScrollY()); 20 } 21 } 22