ocmock_complex_type_helper.h 1014 B

12345678910111213141516171819202122
  1. // Copyright 2012 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef IOS_TESTING_OCMOCK_COMPLEX_TYPE_HELPER_H_
  5. #define IOS_TESTING_OCMOCK_COMPLEX_TYPE_HELPER_H_
  6. #import "third_party/ocmock/OCMock/OCMock.h"
  7. // OCMock cannot check scalar arguments to method as it requires NSObjects to
  8. // work its magic. This class tries to alleviate this restriction in a crude
  9. // way. For an example of use, see the associated unittest class.
  10. @interface OCMockComplexTypeHelper : NSProxy
  11. // Init OCMockComplexTypeHelper with a represented object (retained).
  12. - (instancetype)initWithRepresentedObject:(OCMockObject*)object;
  13. // Registers a block to be called when a selector is called.
  14. - (void)onSelector:(SEL)selector callBlockExpectation:(id)block;
  15. // Returns the block for the given selector. Intended for use by subclasses.
  16. - (id)blockForSelector:(SEL)selector;
  17. @end
  18. #endif // IOS_TESTING_OCMOCK_COMPLEX_TYPE_HELPER_H_