mirror of
https://github.com/google/nomulus.git
synced 2025-05-14 00:17:20 +02:00
Fix warnings nits from RegistrarAction rename
([] ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=137833414
This commit is contained in:
parent
a244202267
commit
83cbf5a01f
4 changed files with 5 additions and 16 deletions
|
@ -163,7 +163,7 @@ public interface RegistryConfig {
|
||||||
* Returns the email address(es) that notifications of registrar and/or registrar contact updates
|
* Returns the email address(es) that notifications of registrar and/or registrar contact updates
|
||||||
* should be sent to, or the empty list if updates should not be sent.
|
* should be sent to, or the empty list if updates should not be sent.
|
||||||
*
|
*
|
||||||
* @see google.registry.ui.server.registrar.RegistrarAction
|
* @see google.registry.ui.server.registrar.RegistrarSettingsAction
|
||||||
*/
|
*/
|
||||||
public ImmutableList<String> getRegistrarChangesNotificationEmailAddresses();
|
public ImmutableList<String> getRegistrarChangesNotificationEmailAddresses();
|
||||||
|
|
||||||
|
|
|
@ -110,7 +110,7 @@ public class RegistrarSettingsAction implements Runnable, JsonActionRunner.JsonA
|
||||||
case "update":
|
case "update":
|
||||||
return update(args, initialRegistrar);
|
return update(args, initialRegistrar);
|
||||||
case "read":
|
case "read":
|
||||||
return read(args, initialRegistrar);
|
return JsonResponseHelper.create(SUCCESS, "Success", initialRegistrar.toJsonMap());
|
||||||
default:
|
default:
|
||||||
return JsonResponseHelper.create(ERROR, "Unknown or unsupported operation: " + op);
|
return JsonResponseHelper.create(ERROR, "Unknown or unsupported operation: " + op);
|
||||||
}
|
}
|
||||||
|
@ -293,10 +293,6 @@ public class RegistrarSettingsAction implements Runnable, JsonActionRunner.JsonA
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<String, Object> read(Map<String, ?> args, Registrar registrar) {
|
|
||||||
return JsonResponseHelper.create(SUCCESS, "Success", registrar.toJsonMap());
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Thrown when a set of contacts doesn't meet certain constraints. */
|
/** Thrown when a set of contacts doesn't meet certain constraints. */
|
||||||
private static class ContactRequirementException extends FormException {
|
private static class ContactRequirementException extends FormException {
|
||||||
ContactRequirementException(String msg) {
|
ContactRequirementException(String msg) {
|
||||||
|
|
|
@ -27,11 +27,9 @@ import static org.mockito.Mockito.when;
|
||||||
import com.google.common.collect.ImmutableMap;
|
import com.google.common.collect.ImmutableMap;
|
||||||
import google.registry.export.sheet.SyncRegistrarsSheetAction;
|
import google.registry.export.sheet.SyncRegistrarsSheetAction;
|
||||||
import google.registry.model.registrar.Registrar;
|
import google.registry.model.registrar.Registrar;
|
||||||
import google.registry.testing.ExceptionRule;
|
|
||||||
import google.registry.testing.TaskQueueHelper.TaskMatcher;
|
import google.registry.testing.TaskQueueHelper.TaskMatcher;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import javax.mail.internet.InternetAddress;
|
import javax.mail.internet.InternetAddress;
|
||||||
import org.junit.Rule;
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import org.mockito.runners.MockitoJUnitRunner;
|
import org.mockito.runners.MockitoJUnitRunner;
|
||||||
|
@ -40,9 +38,6 @@ import org.mockito.runners.MockitoJUnitRunner;
|
||||||
@RunWith(MockitoJUnitRunner.class)
|
@RunWith(MockitoJUnitRunner.class)
|
||||||
public class RegistrarSettingsActionTest extends RegistrarSettingsActionTestCase {
|
public class RegistrarSettingsActionTest extends RegistrarSettingsActionTestCase {
|
||||||
|
|
||||||
@Rule
|
|
||||||
public final ExceptionRule thrown = new ExceptionRule();
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testSuccess_updateRegistrarInfo_andSendsNotificationEmail() throws Exception {
|
public void testSuccess_updateRegistrarInfo_andSendsNotificationEmail() throws Exception {
|
||||||
String expectedEmailBody = readResourceUtf8(getClass(), "testdata/update_registrar_email.txt");
|
String expectedEmailBody = readResourceUtf8(getClass(), "testdata/update_registrar_email.txt");
|
||||||
|
|
|
@ -32,7 +32,6 @@ import google.registry.request.JsonActionRunner;
|
||||||
import google.registry.request.JsonResponse;
|
import google.registry.request.JsonResponse;
|
||||||
import google.registry.request.ResponseImpl;
|
import google.registry.request.ResponseImpl;
|
||||||
import google.registry.testing.AppEngineRule;
|
import google.registry.testing.AppEngineRule;
|
||||||
import google.registry.testing.ExceptionRule;
|
|
||||||
import google.registry.testing.FakeClock;
|
import google.registry.testing.FakeClock;
|
||||||
import google.registry.testing.InjectRule;
|
import google.registry.testing.InjectRule;
|
||||||
import google.registry.util.SendEmailService;
|
import google.registry.util.SendEmailService;
|
||||||
|
@ -70,9 +69,6 @@ public class RegistrarSettingsActionTestCase {
|
||||||
@Rule
|
@Rule
|
||||||
public final InjectRule inject = new InjectRule();
|
public final InjectRule inject = new InjectRule();
|
||||||
|
|
||||||
@Rule
|
|
||||||
public final ExceptionRule thrown = new ExceptionRule();
|
|
||||||
|
|
||||||
@Mock
|
@Mock
|
||||||
HttpServletRequest req;
|
HttpServletRequest req;
|
||||||
|
|
||||||
|
@ -123,7 +119,9 @@ public class RegistrarSettingsActionTestCase {
|
||||||
protected Map<String, Object> readJsonFromFile(String filename) {
|
protected Map<String, Object> readJsonFromFile(String filename) {
|
||||||
String contents = readResourceUtf8(getClass(), filename);
|
String contents = readResourceUtf8(getClass(), filename);
|
||||||
try {
|
try {
|
||||||
return (Map<String, Object>) JSONValue.parseWithException(contents);
|
@SuppressWarnings("unchecked")
|
||||||
|
Map<String, Object> json = (Map<String, Object>) JSONValue.parseWithException(contents);
|
||||||
|
return json;
|
||||||
} catch (ParseException ex) {
|
} catch (ParseException ex) {
|
||||||
throw new RuntimeException(ex);
|
throw new RuntimeException(ex);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue