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.ManagedTest;
import org.junit.Test;
@Test
public void testMailAddInternalFaulty() {
try {
- new EmailAddress("kurti ", u);
+ new EmailAddress(u, "kurti ");
fail();
} catch (IllegalArgumentException e) {
// Intended.
@Test
public void testMailSetDefaultWeb() throws MalformedURLException, UnsupportedEncodingException, IOException, InterruptedException, GigiApiException {
- ObjectCache.clearAllCashes();
EmailAddress adrr = createVerifiedEmail(u);
assertNull(executeBasicWebInteraction(cookie, path, "makedefault&emailid=" + adrr.getId()));
+ ObjectCache.clearAllCaches();
assertEquals(User.getById(u.getId()).getEmail(), adrr.getAddress());
}
@Test
public void testMailSetDefaultWebUnverified() throws MalformedURLException, UnsupportedEncodingException, IOException, InterruptedException, GigiApiException {
- EmailAddress adrr = new EmailAddress(createUniqueName() + "test@test.tld", u);
+ EmailAddress adrr = new EmailAddress(u, createUniqueName() + "test@test.tld");
adrr.insert(Language.getInstance(Locale.ENGLISH));
assertNotNull(executeBasicWebInteraction(cookie, path, "makedefault&emailid=" + adrr.getId()));
assertNotEquals(User.getById(u.getId()).getEmail(), adrr.getAddress());