1package com.xtremelabs.robolectric.shadows; 2 3import android.graphics.Paint; 4import android.graphics.drawable.ShapeDrawable; 5import com.xtremelabs.robolectric.WithTestDefaultsRunner; 6import org.junit.Test; 7import org.junit.runner.RunWith; 8 9import static org.hamcrest.core.Is.is; 10import static org.junit.Assert.assertNotNull; 11import static org.junit.Assert.assertThat; 12 13@RunWith(WithTestDefaultsRunner.class) 14public class ShapeDrawableTest { 15 @Test 16 public void getPaint_ShouldReturnTheSamePaint() throws Exception { 17 ShapeDrawable shapeDrawable = new ShapeDrawable(); 18 Paint paint = shapeDrawable.getPaint(); 19 assertNotNull(paint); 20 assertThat(shapeDrawable.getPaint(), is(paint)); 21 } 22} 23