|
|
|
@ -48,9 +48,9 @@ static NSString * const kPackage = @"grpc.testing"; |
|
|
|
|
static NSString * const kService = @"TestService"; |
|
|
|
|
static NSString * const kRemoteSSLHost = @"grpc-test.sandbox.googleapis.com"; |
|
|
|
|
|
|
|
|
|
static ProtoMethod *kInexistentMethod; |
|
|
|
|
static ProtoMethod *kEmptyCallMethod; |
|
|
|
|
static ProtoMethod *kUnaryCallMethod; |
|
|
|
|
static GRPCProtoMethod *kInexistentMethod; |
|
|
|
|
static GRPCProtoMethod *kEmptyCallMethod; |
|
|
|
|
static GRPCProtoMethod *kUnaryCallMethod; |
|
|
|
|
|
|
|
|
|
/** Observer class for testing that responseMetadata is KVO-compliant */ |
|
|
|
|
@interface PassthroughObserver : NSObject |
|
|
|
@ -109,13 +109,13 @@ static ProtoMethod *kUnaryCallMethod; |
|
|
|
|
[GRPCCall useInsecureConnectionsForHost:kHostAddress]; |
|
|
|
|
|
|
|
|
|
// This method isn't implemented by the remote server. |
|
|
|
|
kInexistentMethod = [[ProtoMethod alloc] initWithPackage:kPackage |
|
|
|
|
kInexistentMethod = [[GRPCProtoMethod alloc] initWithPackage:kPackage |
|
|
|
|
service:kService |
|
|
|
|
method:@"Inexistent"]; |
|
|
|
|
kEmptyCallMethod = [[ProtoMethod alloc] initWithPackage:kPackage |
|
|
|
|
kEmptyCallMethod = [[GRPCProtoMethod alloc] initWithPackage:kPackage |
|
|
|
|
service:kService |
|
|
|
|
method:@"EmptyCall"]; |
|
|
|
|
kUnaryCallMethod = [[ProtoMethod alloc] initWithPackage:kPackage |
|
|
|
|
kUnaryCallMethod = [[GRPCProtoMethod alloc] initWithPackage:kPackage |
|
|
|
|
service:kService |
|
|
|
|
method:@"UnaryCall"]; |
|
|
|
|
} |
|
|
|
@ -303,7 +303,7 @@ static ProtoMethod *kUnaryCallMethod; |
|
|
|
|
|
|
|
|
|
// Try to set parameters to nil for GRPCCall. This should cause an exception |
|
|
|
|
@try { |
|
|
|
|
GRPCCall *call = [[GRPCCall alloc] initWithHost:nil |
|
|
|
|
GRPCCall *call __unused = [[GRPCCall alloc] initWithHost:nil |
|
|
|
|
path:nil |
|
|
|
|
requestsWriter:nil]; |
|
|
|
|
XCTFail(@"Did not receive an exception when parameters are nil"); |
|
|
|
@ -316,7 +316,7 @@ static ProtoMethod *kUnaryCallMethod; |
|
|
|
|
GRXWriter *requestsWriter = [GRXWriter emptyWriter]; |
|
|
|
|
[requestsWriter finishWithError:nil]; |
|
|
|
|
@try { |
|
|
|
|
GRPCCall *call = [[GRPCCall alloc] initWithHost:kHostAddress |
|
|
|
|
GRPCCall *call __unused = [[GRPCCall alloc] initWithHost:kHostAddress |
|
|
|
|
path:kUnaryCallMethod.HTTPPath |
|
|
|
|
requestsWriter:requestsWriter]; |
|
|
|
|
XCTFail(@"Did not receive an exception when GRXWriter has incorrect state."); |
|
|
|
|