Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 19b7d449 authored by cketti's avatar cketti Committed by GitHub
Browse files

Merge pull request #2193 from k9mail/robolectric-update

Update robolectric, use Runner class instead of annotations
parents 4c8dd420 e8291960
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@ androidCompileSdkVersion=24
androidBuildToolsVersion=24.0.3
androidSupportLibraryVersion=23.1.1

robolectricVersion=3.1.1
robolectricVersion=3.2.2
junitVersion=4.12
mockitoVersion=1.10.19
okioVersion=1.11.0
+1 −3
Original line number Diff line number Diff line
@@ -3,7 +3,6 @@ package com.fsck.k9.mail;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.annotation.Config;

import static org.junit.Assert.assertEquals;
@@ -12,8 +11,7 @@ import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;


@RunWith(RobolectricTestRunner.class)
@Config(manifest = Config.NONE, sdk = 21)
@RunWith(K9LibRobolectricTestRunner.class)
public class AddressTest {
    /**
     * test the possibility to parse "From:" fields with no email.
+1 −4
Original line number Diff line number Diff line
@@ -3,14 +3,11 @@ package com.fsck.k9.mail;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.annotation.Config;

import static org.junit.Assert.assertEquals;


@RunWith(RobolectricTestRunner.class)
@Config(manifest = Config.NONE, sdk = 21)
@RunWith(K9LibRobolectricTestRunner.class)
public class Address_quoteAtoms {
    @Test
    public void testNoQuote() {
+20 −0
Original line number Diff line number Diff line
package com.fsck.k9.mail;

import org.junit.runners.model.InitializationError;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.annotation.Config;

public class K9LibRobolectricTestRunner extends RobolectricTestRunner {

    public K9LibRobolectricTestRunner(Class<?> testClass) throws InitializationError {
        super(testClass);
    }

    @Override
    protected Config buildGlobalConfig() {
        return new Config.Builder()
                .setSdk(22)
                .setManifest(Config.NONE)
                .build();
    }
}
 No newline at end of file
+1 −3
Original line number Diff line number Diff line
@@ -26,7 +26,6 @@ import org.apache.james.mime4j.util.MimeUtil;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.RuntimeEnvironment;
import org.robolectric.annotation.Config;

@@ -34,8 +33,7 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;


@RunWith(RobolectricTestRunner.class)
@Config(manifest = Config.NONE, sdk = 21)
@RunWith(K9LibRobolectricTestRunner.class)
public class MessageTest {

    private Context context;
Loading