diff options
author | Vincent <valodim@mugenguild.com> | 2016-05-17 20:31:40 +0200 |
---|---|---|
committer | Vincent <valodim@mugenguild.com> | 2016-05-17 20:31:40 +0200 |
commit | 60c277b96f5de786b85e44a650f989a717d63a73 (patch) | |
tree | 60ad4b34c2686a5fc4ae45b838a99c391d5d65dc /OpenKeychain/src/test | |
parent | 047b6b34b880fbb207b83eff0a65b4e371093049 (diff) | |
parent | 7b02161ce73ca2e7554098a9250d284e8c274caf (diff) | |
download | open-keychain-60c277b96f5de786b85e44a650f989a717d63a73.tar.gz open-keychain-60c277b96f5de786b85e44a650f989a717d63a73.tar.bz2 open-keychain-60c277b96f5de786b85e44a650f989a717d63a73.zip |
Merge pull request #1870 from AlexFJW/RemovedDuplicateCode
Shifted duplicate method implementations from KeyRing to openpgp-api …
Diffstat (limited to 'OpenKeychain/src/test')
-rw-r--r-- | OpenKeychain/src/test/java/org/sufficientlysecure/keychain/pgp/SplitUserIdTest.java | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/OpenKeychain/src/test/java/org/sufficientlysecure/keychain/pgp/SplitUserIdTest.java b/OpenKeychain/src/test/java/org/sufficientlysecure/keychain/pgp/SplitUserIdTest.java index 97feeea7b..64579bbb3 100644 --- a/OpenKeychain/src/test/java/org/sufficientlysecure/keychain/pgp/SplitUserIdTest.java +++ b/OpenKeychain/src/test/java/org/sufficientlysecure/keychain/pgp/SplitUserIdTest.java @@ -20,6 +20,7 @@ package org.sufficientlysecure.keychain.pgp; import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; +import org.openintents.openpgp.util.OpenPgpUtils; import org.robolectric.RobolectricGradleTestRunner; import org.robolectric.RobolectricTestRunner; import org.robolectric.annotation.Config; @@ -32,7 +33,7 @@ public class SplitUserIdTest { @Test public void splitCompleteUserIdShouldReturnAll3Components() throws Exception { - KeyRing.UserId info = KeyRing.splitUserId("Max Mustermann (this is a comment) <max@example.com>"); + OpenPgpUtils.UserId info = KeyRing.splitUserId("Max Mustermann (this is a comment) <max@example.com>"); Assert.assertEquals("Max Mustermann", info.name); Assert.assertEquals("this is a comment", info.comment); Assert.assertEquals("max@example.com", info.email); @@ -40,7 +41,7 @@ public class SplitUserIdTest { @Test public void splitUserIdWithAllButCommentShouldReturnNameAndEmail() throws Exception { - KeyRing.UserId info = KeyRing.splitUserId("Max Mustermann <max@example.com>"); + OpenPgpUtils.UserId info = KeyRing.splitUserId("Max Mustermann <max@example.com>"); Assert.assertEquals("Max Mustermann", info.name); Assert.assertNull(info.comment); Assert.assertEquals("max@example.com", info.email); @@ -48,7 +49,7 @@ public class SplitUserIdTest { @Test public void splitUserIdWithAllButEmailShouldReturnNameAndComment() throws Exception { - KeyRing.UserId info = KeyRing.splitUserId("Max Mustermann (this is a comment)"); + OpenPgpUtils.UserId info = KeyRing.splitUserId("Max Mustermann (this is a comment)"); Assert.assertEquals("Max Mustermann", info.name); Assert.assertEquals("this is a comment", info.comment); Assert.assertNull(info.email); @@ -56,7 +57,7 @@ public class SplitUserIdTest { @Test public void splitUserIdWithCommentAndEmailShouldReturnCommentAndEmail() throws Exception { - KeyRing.UserId info = KeyRing.splitUserId(" (this is a comment) <max@example.com>"); + OpenPgpUtils.UserId info = KeyRing.splitUserId(" (this is a comment) <max@example.com>"); Assert.assertNull(info.name); Assert.assertEquals("this is a comment", info.comment); Assert.assertEquals("max@example.com", info.email); @@ -64,7 +65,7 @@ public class SplitUserIdTest { @Test public void splitUserIdWithEmailShouldReturnEmail() throws Exception { - KeyRing.UserId info = KeyRing.splitUserId("max@example.com"); + OpenPgpUtils.UserId info = KeyRing.splitUserId("max@example.com"); Assert.assertNull(info.name); Assert.assertNull(info.comment); Assert.assertEquals("max@example.com", info.email); @@ -72,7 +73,7 @@ public class SplitUserIdTest { @Test public void splitUserIdWithNameShouldReturnName() throws Exception { - KeyRing.UserId info = KeyRing.splitUserId("Max Mustermann"); + OpenPgpUtils.UserId info = KeyRing.splitUserId("Max Mustermann"); Assert.assertEquals("Max Mustermann", info.name); Assert.assertNull(info.comment); Assert.assertNull(info.email); @@ -80,7 +81,7 @@ public class SplitUserIdTest { @Test public void splitUserIdWithCommentShouldReturnComment() throws Exception { - KeyRing.UserId info = KeyRing.splitUserId(" (this is a comment)"); + OpenPgpUtils.UserId info = KeyRing.splitUserId(" (this is a comment)"); Assert.assertNull(info.name); Assert.assertEquals("this is a comment", info.comment); Assert.assertNull(info.email); |