aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/com/xtremelabs/robolectric/shadows/ShapeDrawableTest.java
blob: e2348a279471b97fa7b70a26844d4f96f7b0eb1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package com.xtremelabs.robolectric.shadows;

import android.graphics.Paint;
import android.graphics.drawable.ShapeDrawable;
import com.xtremelabs.robolectric.WithTestDefaultsRunner;
import org.junit.Test;
import org.junit.runner.RunWith;

import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertThat;

@RunWith(WithTestDefaultsRunner.class)
public class ShapeDrawableTest {
    @Test
    public void getPaint_ShouldReturnTheSamePaint() throws Exception {
        ShapeDrawable shapeDrawable = new ShapeDrawable();
        Paint paint = shapeDrawable.getPaint();
        assertNotNull(paint);
        assertThat(shapeDrawable.getPaint(), is(paint));
    }
}