PMD: Re-enable on test files

This used to be the case, which is why only minimal changes were
required to bring it back. This also makes it take the same files that
checkstyle does, which is more consistent.
This commit is contained in:
Daniel Martí 2016-04-19 21:36:37 +01:00
parent 2074718391
commit a484c03816
3 changed files with 6 additions and 2 deletions

View File

@ -218,7 +218,7 @@ task pmd(type: Pmd, dependsOn: assembleDebug) {
'java-migrating',
//'java-unnecessary', // too nitpicky with parenthesis
]
source 'src/main/java'
source 'src/main/java', 'src/test/java', 'src/androidTest/java'
include '**/*.java'
}

View File

@ -27,6 +27,9 @@ import android.os.Build;
import android.test.mock.MockContentResolver;
import android.test.mock.MockContext;
import org.junit.After;
import org.junit.Before;
import java.io.File;
/**
@ -132,6 +135,7 @@ public abstract class ProviderTestCase2MockContext<T extends ContentProvider> ex
* @throws Exception
*/
@Override
@Before
protected void setUp() throws Exception {
super.setUp();
@ -165,6 +169,7 @@ public abstract class ProviderTestCase2MockContext<T extends ContentProvider> ex
* {@link android.content.ContentProvider} represented by mProvider.
*/
@Override
@After
protected void tearDown() throws Exception {
shutdownProvider();
super.tearDown();

View File

@ -18,7 +18,6 @@ import static org.junit.Assert.fail;
@RunWith(AndroidJUnit4.class)
public class RepoUpdaterTest {
private static final String TAG = "RepoUpdaterTest";
private Context context;
private RepoUpdater repoUpdater;