From 54fa62e3db569d6a06e1cd0042619eb3ba81ef41 Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Wed, 28 Oct 2015 14:46:23 -0700 Subject: Reject nils in useTestCertsPath:testName:forHost: --- src/objective-c/GRPCClient/GRPCCall+Tests.m | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/objective-c/GRPCClient/GRPCCall+Tests.m') diff --git a/src/objective-c/GRPCClient/GRPCCall+Tests.m b/src/objective-c/GRPCClient/GRPCCall+Tests.m index bade0b2920..c8e8133703 100644 --- a/src/objective-c/GRPCClient/GRPCCall+Tests.m +++ b/src/objective-c/GRPCClient/GRPCCall+Tests.m @@ -40,6 +40,9 @@ + (void)useTestCertsPath:(NSString *)certsPath testName:(NSString *)testName forHost:(NSString *)host { + if (!host || !certsPath || !testName) { + [NSException raise:NSInvalidArgumentException format:@"host, path and name must be provided."]; + } GRPCHost *hostConfig = [GRPCHost hostWithAddress:host]; hostConfig.pathToCertificates = certsPath; hostConfig.hostNameOverride = testName; -- cgit v1.2.3