mirror of
https://github.com/google/nomulus.git
synced 2025-05-14 16:37:13 +02: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:
parent
97aa98eb35
commit
b48061b792
31 changed files with 269 additions and 329 deletions
|
@ -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())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue