This PR contains all the work related to setting up this project as required to implement the [Assignment](https://repo.rock-n-code.com/rock-n-code/deep-linking-assignment/wiki/Assignment) on top, as intended. To summarise this work: - [x] created a new **Xcode** project; - [x] cloned the `Wikipedia` app and inserted it into the **Xcode** project; - [x] created the `Locations` app and also, its `Libraries` package; - [x] created the `Shared` package to share dependencies between the apps; - [x] added a `Makefile` file and implemented some **environment** and **help** commands. Co-authored-by: Javier Cicchelli <javier@rock-n-code.com> Reviewed-on: rock-n-code/deep-linking-assignment#1
40 lines
1.3 KiB
Objective-C
40 lines
1.3 KiB
Objective-C
#import <Foundation/Foundation.h>
|
|
#import "NSString+Matcheable.h"
|
|
#import "NSRegularExpression+Matcheable.h"
|
|
#import "NSData+Matcheable.h"
|
|
|
|
@class LSStubRequestDSL;
|
|
@class LSStubResponseDSL;
|
|
@class LSStubRequest;
|
|
|
|
@protocol LSHTTPBody;
|
|
|
|
typedef LSStubRequestDSL *(^WithHeaderMethod)(NSString *, NSString *);
|
|
typedef LSStubRequestDSL *(^WithHeadersMethod)(NSDictionary *);
|
|
typedef LSStubRequestDSL *(^AndBodyMethod)(id<LSMatcheable>);
|
|
typedef LSStubResponseDSL *(^AndReturnMethod)(NSInteger);
|
|
typedef LSStubResponseDSL *(^AndReturnRawResponseMethod)(NSData *rawResponseData);
|
|
typedef void (^AndFailWithErrorMethod)(NSError *error);
|
|
|
|
@interface LSStubRequestDSL : NSObject
|
|
- (id)initWithRequest:(LSStubRequest *)request;
|
|
|
|
@property (nonatomic, strong, readonly) WithHeaderMethod withHeader;
|
|
@property (nonatomic, strong, readonly) WithHeadersMethod withHeaders;
|
|
@property (nonatomic, strong, readonly) AndBodyMethod withBody;
|
|
@property (nonatomic, strong, readonly) AndReturnMethod andReturn;
|
|
@property (nonatomic, strong, readonly) AndReturnRawResponseMethod andReturnRawResponse;
|
|
@property (nonatomic, strong, readonly) AndFailWithErrorMethod andFailWithError;
|
|
|
|
@end
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
LSStubRequestDSL * stubRequest(NSString *method, id<LSMatcheable> url);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|