aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c/tests/InteropTestsLocalSSL.m
diff options
context:
space:
mode:
Diffstat (limited to 'src/objective-c/tests/InteropTestsLocalSSL.m')
-rw-r--r--src/objective-c/tests/InteropTestsLocalSSL.m13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/objective-c/tests/InteropTestsLocalSSL.m b/src/objective-c/tests/InteropTestsLocalSSL.m
index 9d7afefbfe..155e334ecb 100644
--- a/src/objective-c/tests/InteropTestsLocalSSL.m
+++ b/src/objective-c/tests/InteropTestsLocalSSL.m
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2015, Google Inc.
+ * Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -57,4 +57,15 @@ static NSString * const kLocalSSLHost = @"localhost:5051";
[super setUp];
}
+- (void)testExceptions {
+ // Try to set userAgentPrefix for host that is nil. This should cause
+ // an exception.
+ @try {
+ [GRPCCall useTestCertsPath:nil testName:nil forHost:nil];
+ XCTFail(@"Did not receive an exception when parameters are nil");
+ } @catch(NSException *theException) {
+ NSLog(@"Received exception as expected: %@", theException.name);
+ }
+}
+
@end