File tree Expand file tree Collapse file tree 4 files changed +78
-154
lines changed
main/java/net/rdrei/android/absshadow
test/java/net/rdrei/android/absshadow/test Expand file tree Collapse file tree 4 files changed +78
-154
lines changed Original file line number Diff line number Diff line change 66
77public class MainActivity extends SherlockActivity
88{
9- /** Called when the activity is first created. */
10- @ Override
11- public void onCreate (Bundle savedInstanceState )
12- {
13- super .onCreate (savedInstanceState );
14- setContentView (R .layout .main );
9+ /** Called when the activity is first created. */
10+ @ Override
11+ public void onCreate (Bundle savedInstanceState )
12+ {
13+ super .onCreate (savedInstanceState );
14+ setContentView (R .layout .main );
1515
16- ActionBar actionBar = this .getSupportActionBar ();
17- actionBar .setDisplayShowTitleEnabled (true );
18- }
16+ ActionBar actionBar = this .getSupportActionBar ();
17+ actionBar .setDisplayShowTitleEnabled (true );
18+ }
1919}
Original file line number Diff line number Diff line change 99
1010public class CustomTestRunner extends RobolectricTestRunner {
1111
12- public CustomTestRunner (Class <?> testClass ) throws InitializationError {
13- super (testClass );
12+ public CustomTestRunner (Class <?> testClass ) throws InitializationError {
13+ super (testClass );
1414 addClassOrPackageToInstrument ("com.actionbarsherlock.app.SherlockActivity" );
15- }
15+ }
1616
17- @ Override
18- protected void bindShadowClasses () {
19- super .bindShadowClasses ();
17+ @ Override
18+ protected void bindShadowClasses () {
19+ super .bindShadowClasses ();
2020 Robolectric .bindShadowClass (ShadowSherlockActivity .class );
21- }
21+ }
2222}
Original file line number Diff line number Diff line change 77@ RunWith (CustomTestRunner .class )
88public class MainActivityTest {
99
10- @ Test
11- public void initialize () {
12- MainActivity activity = new MainActivity ();
13- activity .onCreate (null );
14- }
10+ @ Test
11+ public void initialize () {
12+ MainActivity activity = new MainActivity ();
13+ activity .onCreate (null );
14+ }
1515}
You can’t perform that action at this time.
0 commit comments