1 package com.xtremelabs.robolectric.shadows;
2 
3 import android.app.Activity;
4 import android.widget.ViewFlipper;
5 import com.xtremelabs.robolectric.WithTestDefaultsRunner;
6 import org.junit.Before;
7 import org.junit.Test;
8 import org.junit.runner.RunWith;
9 
10 import static org.junit.Assert.assertEquals;
11 
12 @RunWith(WithTestDefaultsRunner.class)
13 public class ViewFlipperTest {
14     protected ViewFlipper flipper;
15 
16     @Before
setUp()17     public void setUp() {
18         flipper = new ViewFlipper(new Activity());
19     }
20 
21     @Test
testStartFlipping()22     public void testStartFlipping() {
23         flipper.startFlipping();
24         assertEquals("flipping", true, flipper.isFlipping());
25     }
26 
27     @Test
testStopFlipping()28     public void testStopFlipping() {
29         flipper.stopFlipping();
30         assertEquals("flipping", false, flipper.isFlipping());
31     }
32 }
33