AppCenter/AppCenterTests/MSACAppDelegateForwarderTests.m [423:452]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  NSURL *expectedURL = [NSURL URLWithString:@"https://www.contoso.com/sending-positive-waves"];
  NSDictionary *expectedAnnotation = @{};
  BOOL expectedReturnedValue = YES;
  MSACApplication *appMock = self.appMock;
  XCTestExpectation *originalCalledExpectation = [self expectationWithDescription:@"Original delegate called."];
  SEL originalOpenURLiOS42Sel = @selector(application:openURL:sourceApplication:annotation:);
  [self.sut addDelegateSelectorToSwizzle:originalOpenURLiOS42Sel];
  id<MSACApplicationDelegate> originalAppDelegate = [self createOriginalAppDelegateInstance];
  id originalOpenURLiOS42Imp =
      ^(__attribute__((unused)) id itSelf, MSACApplication *application, NSURL *url, NSString *sApplication, id annotation) {
        // Then
        assertThat(application, is(appMock));
        assertThat(url, is(expectedURL));
        assertThat(sApplication, nilValue());
        assertThat(annotation, is(expectedAnnotation));
        [originalCalledExpectation fulfill];
        return expectedReturnedValue;
      };
  [MSACDelegateForwarderTestUtil addSelector:originalOpenURLiOS42Sel implementation:originalOpenURLiOS42Imp toInstance:originalAppDelegate];
  SEL customOpenURLiOS42Sel = @selector(application:openURL:sourceApplication:annotation:returnedValue:);
  id<MSACCustomApplicationDelegate> customAppDelegate = [self createCustomAppDelegateInstance];
  id customOpenURLiOS42Imp =
      ^(__attribute__((unused)) id itSelf, __attribute__((unused)) MSACApplication *application, __attribute__((unused)) NSURL *url,
        __attribute__((unused)) NSString *sApplication, __attribute__((unused)) id annotation, __attribute__((unused)) BOOL returnedValue) {
        // Then
        XCTFail(@"Custom delegate got called but is removed.");
        return expectedReturnedValue;
      };
  [MSACDelegateForwarderTestUtil addSelector:customOpenURLiOS42Sel implementation:customOpenURLiOS42Imp toInstance:customAppDelegate];
  [self.sut addDelegate:customAppDelegate];
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



AppCenter/AppCenterTests/MSACAppDelegateForwarderTests.m [471:500]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  NSURL *expectedURL = [NSURL URLWithString:@"https://www.contoso.com/sending-positive-waves"];
  NSDictionary *expectedAnnotation = @{};
  BOOL expectedReturnedValue = YES;
  MSACApplication *appMock = self.appMock;
  XCTestExpectation *originalCalledExpectation = [self expectationWithDescription:@"Original delegate called."];
  SEL originalOpenURLiOS42Sel = @selector(application:openURL:sourceApplication:annotation:);
  [self.sut addDelegateSelectorToSwizzle:originalOpenURLiOS42Sel];
  id<MSACApplicationDelegate> originalAppDelegate = [self createOriginalAppDelegateInstance];
  id originalOpenURLiOS42Imp =
      ^(__attribute__((unused)) id itSelf, MSACApplication *application, NSURL *url, NSString *sApplication, id annotation) {
        // Then
        assertThat(application, is(appMock));
        assertThat(url, is(expectedURL));
        assertThat(sApplication, nilValue());
        assertThat(annotation, is(expectedAnnotation));
        [originalCalledExpectation fulfill];
        return expectedReturnedValue;
      };
  [MSACDelegateForwarderTestUtil addSelector:originalOpenURLiOS42Sel implementation:originalOpenURLiOS42Imp toInstance:originalAppDelegate];
  SEL customOpenURLiOS42Sel = @selector(application:openURL:sourceApplication:annotation:returnedValue:);
  id<MSACCustomApplicationDelegate> customAppDelegate = [self createCustomAppDelegateInstance];
  id customOpenURLiOS42Imp =
      ^(__attribute__((unused)) id itSelf, __attribute__((unused)) MSACApplication *application, __attribute__((unused)) NSURL *url,
        __attribute__((unused)) NSString *sApplication, __attribute__((unused)) id annotation, __attribute__((unused)) BOOL returnedValue) {
        // Then
        XCTFail(@"Custom delegate got called but is removed.");
        return expectedReturnedValue;
      };
  [MSACDelegateForwarderTestUtil addSelector:customOpenURLiOS42Sel implementation:customOpenURLiOS42Imp toInstance:customAppDelegate];
  [self.sut addDelegate:customAppDelegate];
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



