From 54831fba7388eef82cf214912678ab9e067cee55 Mon Sep 17 00:00:00 2001 From: cketti Date: Mon, 16 Mar 2015 16:05:25 +0100 Subject: [PATCH] Remove test for openpgp-api-library code --- .../com/fsck/k9/crypto/OpenPgpUtilsTest.java | 54 ------------------- 1 file changed, 54 deletions(-) delete mode 100644 k9mail/src/androidTest/java/com/fsck/k9/crypto/OpenPgpUtilsTest.java diff --git a/k9mail/src/androidTest/java/com/fsck/k9/crypto/OpenPgpUtilsTest.java b/k9mail/src/androidTest/java/com/fsck/k9/crypto/OpenPgpUtilsTest.java deleted file mode 100644 index 3f1838c34..000000000 --- a/k9mail/src/androidTest/java/com/fsck/k9/crypto/OpenPgpUtilsTest.java +++ /dev/null @@ -1,54 +0,0 @@ -package com.fsck.k9.crypto; - - -import android.support.test.runner.AndroidJUnit4; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.openintents.openpgp.util.OpenPgpUtils; - -import static junit.framework.Assert.assertEquals; -import static junit.framework.Assert.assertNull; - - -@RunWith(AndroidJUnit4.class) -public class OpenPgpUtilsTest { - - @Test - public void splitCompleteUserIdShouldReturnAll3Components() throws Exception { - OpenPgpUtils.UserInfo info = OpenPgpUtils.splitUserId("Max Mustermann (this is a comment) "); - - assertEquals("Max Mustermann", info.name); - assertEquals("this is a comment", info.comment); - assertEquals("max@example.com", info.email); - } - - - @Test - public void splitUserIdWithAllButCommentShouldReturnNameAndEmail() throws Exception { - OpenPgpUtils.UserInfo info = OpenPgpUtils.splitUserId("Max Mustermann "); - - assertEquals("Max Mustermann", info.name); - assertNull(info.comment); - assertEquals("max@example.com", info.email); - } - - @Test - public void splitUserIdWithAllButEmailShouldReturnNameAndComment() throws Exception { - OpenPgpUtils.UserInfo info = OpenPgpUtils.splitUserId("Max Mustermann (this is a comment)"); - - assertEquals(info.name, "Max Mustermann"); - assertEquals(info.comment, "this is a comment"); - assertNull(info.email); - } - - - @Test - public void splitUserIdWithOnlyNameShouldReturnNameOnly() throws Exception { - OpenPgpUtils.UserInfo info = OpenPgpUtils.splitUserId("Max Mustermann [this is a nothing]"); - - assertEquals("Max Mustermann", info.name); - assertNull(info.comment); - assertNull(info.email); - } -}