复制代码
- [[theValue(boolVar) should] beYes]
- [[theValue(boolVar) shouldNot] beYes]
- [[theValue(boolVar) should] beNo]
- [[theValue(boolVar) shouldNot] beNo]
复制代码
- [[theValue(1) should] equal:@(1)]
- [[@"string1" shouldNot] equal:@"string"]
复制代码
- - (void)stub:(SEL)aSelector;
- - (void)stub:(SEL)aSelector withBlock:(id (^)(NSArray *params))block;
- - (void)stub:(SEL)aSelector withArguments:(id)firstArgument, ...;
- - (void)stub:(SEL)aSelector andReturn:(id)aValue;
- - (void)stub:(SEL)aSelector andReturn:(id)aValue withArguments:(id)firstArgument, ...;
- - (void)stub:(SEL)aSelector andReturn:(id)aValue times:(NSNumber *)times afterThatReturn:(id)aSecondValue;
- + (void)stub:(SEL)aSelector;
- + (void)stub:(SEL)aSelector withBlock:(id (^)(NSArray *params))block;
- + (void)stub:(SEL)aSelector withArguments:(id)firstArgument, ...;
- + (void)stub:(SEL)aSelector andReturn:(id)aValue;
- + (void)stub:(SEL)aSelector andReturn:(id)aValue withArguments:(id)firstArgument, ...;
- + (void)stub:(SEL)aSelector andReturn:(id)aValue times:(NSNumber *)times afterThatReturn:(id)aSecondValue;
// NSOject + KiwiMockAdditions.h
/// mock调用的类
+ (id)mock;
// KWMock.h
/// mock指定class并生成一个对象/// mock一个遵循指定协议的对象复制代码
- + (id)mockForClass:(Class)aClass;
/// 根据指定的object生成一个mock了该object类型的对象复制代码
- + (id)mockForProtocol:(Protocol *)aProtocol;
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) | Powered by Discuz! X3.2 |