aboutsummaryrefslogtreecommitdiff
path: root/auth
diff options
context:
space:
mode:
authorCarl Mastrangelo <notcarl@google.com>2017-01-23 12:29:35 -0800
committerGitHub <noreply@github.com>2017-01-23 12:29:35 -0800
commitefbcd1f1b95b93c925d9575aa8571dfa5023b476 (patch)
tree2107ed6897c70a34799cf2b99a68d70a3955af1b /auth
parente9fa8c99ceba92753998ee7c3b5fece44aa635b9 (diff)
downloadgrpc-grpc-java-efbcd1f1b95b93c925d9575aa8571dfa5023b476.tar.gz
core: change method descriptor to be builder based
Diffstat (limited to 'auth')
-rw-r--r--auth/src/test/java/io/grpc/auth/ClientAuthInterceptorTest.java8
-rw-r--r--auth/src/test/java/io/grpc/auth/GoogleAuthLibraryCallCredentialsTest.java8
2 files changed, 12 insertions, 4 deletions
diff --git a/auth/src/test/java/io/grpc/auth/ClientAuthInterceptorTest.java b/auth/src/test/java/io/grpc/auth/ClientAuthInterceptorTest.java
index 06f5a5f61..e13c5839b 100644
--- a/auth/src/test/java/io/grpc/auth/ClientAuthInterceptorTest.java
+++ b/auth/src/test/java/io/grpc/auth/ClientAuthInterceptorTest.java
@@ -111,8 +111,12 @@ public class ClientAuthInterceptorTest {
@Before
public void startUp() {
MockitoAnnotations.initMocks(this);
- descriptor = MethodDescriptor.create(
- MethodDescriptor.MethodType.UNKNOWN, "a.service/method", stringMarshaller, intMarshaller);
+ descriptor = MethodDescriptor.<String, Integer>newBuilder()
+ .setType(MethodDescriptor.MethodType.UNKNOWN)
+ .setFullMethodName("a.service/method")
+ .setRequestMarshaller(stringMarshaller)
+ .setResponseMarshaller(intMarshaller)
+ .build();
when(channel.newCall(same(descriptor), any(CallOptions.class))).thenReturn(call);
doReturn("localhost:443").when(channel).authority();
interceptor = new ClientAuthInterceptor(credentials, executor);
diff --git a/auth/src/test/java/io/grpc/auth/GoogleAuthLibraryCallCredentialsTest.java b/auth/src/test/java/io/grpc/auth/GoogleAuthLibraryCallCredentialsTest.java
index 118fff8a9..8fb0f54e1 100644
--- a/auth/src/test/java/io/grpc/auth/GoogleAuthLibraryCallCredentialsTest.java
+++ b/auth/src/test/java/io/grpc/auth/GoogleAuthLibraryCallCredentialsTest.java
@@ -127,8 +127,12 @@ public class GoogleAuthLibraryCallCredentialsTest {
@Before
public void setUp() throws Exception {
MockitoAnnotations.initMocks(this);
- method = MethodDescriptor.create(
- MethodDescriptor.MethodType.UNKNOWN, "a.service/method", stringMarshaller, intMarshaller);
+ method = MethodDescriptor.<String, Integer>newBuilder()
+ .setType(MethodDescriptor.MethodType.UNKNOWN)
+ .setFullMethodName("a.service/method")
+ .setRequestMarshaller(stringMarshaller)
+ .setResponseMarshaller(intMarshaller)
+ .build();
expectedUri = new URI("https://testauthority/a.service");
doAnswer(new Answer<Void>() {
@Override