X-Git-Url: https://code.wpia.club/?p=gigi.git;a=blobdiff_plain;f=tests%2Forg%2Fcacert%2Fgigi%2Fpages%2Faccount%2FTestMailManagement.java;h=bf97c26964c5c7a697d8fd6309eb973757f313d2;hp=6659a1e115cbacb5467aca7c3cbe8e75267ee8b0;hb=673e3f834a719f3b1bfceedfd801a21ca7842cf2;hpb=8af6231b22da4fef795bcb54913faad6592b1a02 diff --git a/tests/org/cacert/gigi/pages/account/TestMailManagement.java b/tests/org/cacert/gigi/pages/account/TestMailManagement.java index 6659a1e1..bf97c269 100644 --- a/tests/org/cacert/gigi/pages/account/TestMailManagement.java +++ b/tests/org/cacert/gigi/pages/account/TestMailManagement.java @@ -12,7 +12,6 @@ import org.cacert.gigi.GigiApiException; import org.cacert.gigi.dbObjects.EmailAddress; import org.cacert.gigi.dbObjects.ObjectCache; import org.cacert.gigi.dbObjects.User; -import org.cacert.gigi.localisation.Language; import org.cacert.gigi.pages.account.mail.MailOverview; import org.cacert.gigi.testUtils.ClientTest; import org.junit.Test; @@ -32,9 +31,9 @@ public class TestMailManagement extends ClientTest { } @Test - public void testMailAddInternalFaulty() { + public void testMailAddInternalFaulty() throws GigiApiException { try { - new EmailAddress(u, "kurti "); + new EmailAddress(u, "kurti ", Locale.ENGLISH); fail(); } catch (IllegalArgumentException e) { // Intended. @@ -76,8 +75,7 @@ public class TestMailManagement extends ClientTest { @Test public void testMailSetDefaultWebUnverified() throws MalformedURLException, UnsupportedEncodingException, IOException, InterruptedException, GigiApiException { - EmailAddress adrr = new EmailAddress(u, createUniqueName() + "test@test.tld"); - adrr.insert(Language.getInstance(Locale.ENGLISH)); + EmailAddress adrr = new EmailAddress(u, createUniqueName() + "test@test.tld", Locale.ENGLISH); assertNotNull(executeBasicWebInteraction(cookie, path, "makedefault&emailid=" + adrr.getId())); assertNotEquals(User.getById(u.getId()).getEmail(), adrr.getAddress()); getMailReciever().clearMails();