mirror of
https://github.com/google/nomulus
synced 2026-09-06 08:07:03 +00:00
Refactor AppEngineConnection
AppEngineConnection can now connect to all services and not just the tools. The default is still the tools. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=218734983
This commit is contained in:
@@ -23,7 +23,6 @@ import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.io.Files;
|
||||
import com.google.common.net.MediaType;
|
||||
import google.registry.testing.UriParameters;
|
||||
import google.registry.tools.CommandWithConnection.Connection;
|
||||
import java.io.File;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import org.mockito.ArgumentCaptor;
|
||||
@@ -46,13 +45,14 @@ public abstract class CreateOrUpdatePremiumListCommandTestCase<
|
||||
}
|
||||
|
||||
void verifySentParams(
|
||||
Connection connection, String path, ImmutableMap<String, String> parameterMap)
|
||||
throws Exception {
|
||||
verify(connection).send(
|
||||
eq(path),
|
||||
urlParamCaptor.capture(),
|
||||
eq(MediaType.FORM_DATA),
|
||||
requestBodyCaptor.capture());
|
||||
AppEngineConnection connection, String path, ImmutableMap<String, String> parameterMap)
|
||||
throws Exception {
|
||||
verify(connection)
|
||||
.sendPostRequest(
|
||||
eq(path),
|
||||
urlParamCaptor.capture(),
|
||||
eq(MediaType.FORM_DATA),
|
||||
requestBodyCaptor.capture());
|
||||
assertThat(new ImmutableMap.Builder<String, String>()
|
||||
.putAll(urlParamCaptor.getValue())
|
||||
.putAll(UriParameters.parse(new String(requestBodyCaptor.getValue(), UTF_8)).entries())
|
||||
|
||||
Reference in New Issue
Block a user