Update integration test of objc client

This commit is contained in:
geekerzp 2015-07-15 11:58:31 +08:00
parent 13d74f01a2
commit 02f6c805af
15 changed files with 86 additions and 108 deletions

View File

@ -1,5 +1,5 @@
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import "JSONModel.h" #import <JSONModel/JSONModel.h>
@interface {{classPrefix}}Object : JSONModel @interface {{classPrefix}}Object : JSONModel
@end @end

View File

@ -16,13 +16,13 @@ Pod::Spec.new do |s|
{{appDescription}} {{appDescription}}
DESC DESC
{{/hasMore}}{{/apis}}{{/apiInfo}} {{/hasMore}}{{/apis}}{{/apiInfo}}
s.license = 'MIT'
s.platform = :ios, '7.0' s.platform = :ios, '7.0'
s.requires_arc = true s.requires_arc = true
s.framework = 'SystemConfiguration'
s.source_files = '{{podName}}/**/*' s.source_files = '{{podName}}/**/*'
s.public_header_files = '{{podVersion}}/**/*.h' s.public_header_files = '{{podName}}/**/*.h'
s.dependency 'AFNetworking', '~> 2.3' s.dependency 'AFNetworking', '~> 2.3'
s.dependency 'JSONModel', '~> 1.1' s.dependency 'JSONModel', '~> 1.1'

View File

@ -16,13 +16,13 @@ Pod::Spec.new do |s|
This is a sample server Petstore server. You can find out more about Swagger at &lt;a href=\&quot;http://swagger.io\&quot;&gt;http://swagger.io&lt;/a&gt; or on irc.freenode.net, #swagger. For this sample, you can use the api key \&quot;special-key\&quot; to test the authorization filters This is a sample server Petstore server. You can find out more about Swagger at &lt;a href=\&quot;http://swagger.io\&quot;&gt;http://swagger.io&lt;/a&gt; or on irc.freenode.net, #swagger. For this sample, you can use the api key \&quot;special-key\&quot; to test the authorization filters
DESC DESC
s.license = 'MIT'
s.platform = :ios, '7.0' s.platform = :ios, '7.0'
s.requires_arc = true s.requires_arc = true
s.framework = 'SystemConfiguration'
s.source_files = 'SwaggerClient/**/*' s.source_files = 'SwaggerClient/**/*'
s.public_header_files = '1.0.0/**/*.h' s.public_header_files = 'SwaggerClient/**/*.h'
s.dependency 'AFNetworking', '~> 2.3' s.dependency 'AFNetworking', '~> 2.3'
s.dependency 'JSONModel', '~> 1.1' s.dependency 'JSONModel', '~> 1.1'

View File

@ -26,11 +26,6 @@ extern NSString *const SWGResponseObjectErrorKey;
@property(nonatomic, assign) NSURLRequestCachePolicy cachePolicy; @property(nonatomic, assign) NSURLRequestCachePolicy cachePolicy;
@property(nonatomic, assign) NSTimeInterval timeoutInterval; @property(nonatomic, assign) NSTimeInterval timeoutInterval;
@property(nonatomic, assign) BOOL logRequests;
@property(nonatomic, assign) BOOL logCacheHits;
@property(nonatomic, assign) BOOL logServerResponses;
@property(nonatomic, assign) BOOL logJSON;
@property(nonatomic, assign) BOOL logHTTP;
@property(nonatomic, readonly) NSOperationQueue* queue; @property(nonatomic, readonly) NSOperationQueue* queue;
/** /**
@ -49,13 +44,6 @@ extern NSString *const SWGResponseObjectErrorKey;
*/ */
+(NSOperationQueue*) sharedQueue; +(NSOperationQueue*) sharedQueue;
/**
* Turn on logging
*
* @param state logging state, must be `YES` or `NO`
*/
+(void)setLoggingEnabled:(bool) state;
/** /**
* Clear Cache * Clear Cache
*/ */
@ -179,6 +167,17 @@ extern NSString *const SWGResponseObjectErrorKey;
*/ */
- (id) deserialize:(id) data class:(NSString *) class; - (id) deserialize:(id) data class:(NSString *) class;
/**
* Logging request and response
*
* @param operation AFHTTPRequestOperation for the HTTP request.
* @param request The HTTP request.
* @param error The error of the HTTP request.
*/
- (void)logResponse:(AFHTTPRequestOperation *)operation
forRequest:(NSURLRequest *)request
error:(NSError *)error;
/** /**
* Perform request * Perform request
* *

View File

@ -11,31 +11,38 @@ static bool cacheEnabled = false;
static AFNetworkReachabilityStatus reachabilityStatus = AFNetworkReachabilityStatusNotReachable; static AFNetworkReachabilityStatus reachabilityStatus = AFNetworkReachabilityStatusNotReachable;
static NSOperationQueue* sharedQueue; static NSOperationQueue* sharedQueue;
static void (^reachabilityChangeBlock)(int); static void (^reachabilityChangeBlock)(int);
static bool loggingEnabled = true;
#pragma mark - Log Methods #pragma mark - Log Methods
+(void)setLoggingEnabled:(bool) state { - (void)logResponse:(AFHTTPRequestOperation *)operation
loggingEnabled = state; forRequest:(NSURLRequest *)request
error:(NSError*)error {
SWGConfiguration *config = [SWGConfiguration sharedConfig];
NSString *message = [NSString stringWithFormat:@"\n[DEBUG] Request body \n~BEGIN~\n %@\n~END~\n"\
"[DEBUG] HTTP Response body \n~BEGIN~\n %@\n~END~\n",
[[NSString alloc] initWithData:request.HTTPBody encoding:NSUTF8StringEncoding],
operation.responseString];
if (config.loggingFileHanlder) {
[config.loggingFileHanlder seekToEndOfFile];
[config.loggingFileHanlder writeData:[message dataUsingEncoding:NSUTF8StringEncoding]];
}
NSLog(@"%@", message);
} }
- (void)logRequest:(NSURLRequest*)request { #pragma mark - Cache Methods
NSLog(@"request: %@", [self descriptionForRequest:request]);
}
- (void)logResponse:(id)data forRequest:(NSURLRequest*)request error:(NSError*)error { + (void) setCacheEnabled:(BOOL)enabled {
NSLog(@"request: %@ response: %@ ", [self descriptionForRequest:request], data ); cacheEnabled = enabled;
} }
#pragma mark -
+(void)clearCache { +(void)clearCache {
[[NSURLCache sharedURLCache] removeAllCachedResponses]; [[NSURLCache sharedURLCache] removeAllCachedResponses];
} }
+(void)setCacheEnabled:(BOOL)enabled { #pragma mark -
cacheEnabled = enabled;
}
+(void)configureCacheWithMemoryAndDiskCapacity: (unsigned long) memorySize +(void)configureCacheWithMemoryAndDiskCapacity: (unsigned long) memorySize
diskSize: (unsigned long) diskSize { diskSize: (unsigned long) diskSize {
@ -80,10 +87,10 @@ static bool loggingEnabled = true;
if (client == nil) { if (client == nil) {
client = [[SWGApiClient alloc] initWithBaseURL:[NSURL URLWithString:baseUrl]]; client = [[SWGApiClient alloc] initWithBaseURL:[NSURL URLWithString:baseUrl]];
[_pool setValue:client forKey:baseUrl ]; [_pool setValue:client forKey:baseUrl ];
if(loggingEnabled) if([[SWGConfiguration sharedConfig] debug])
NSLog(@"new client for path %@", baseUrl); NSLog(@"new client for path %@", baseUrl);
} }
if(loggingEnabled) if([[SWGConfiguration sharedConfig] debug])
NSLog(@"returning client for path %@", baseUrl); NSLog(@"returning client for path %@", baseUrl);
return client; return client;
} }
@ -146,7 +153,7 @@ static bool loggingEnabled = true;
+(NSNumber*) nextRequestId { +(NSNumber*) nextRequestId {
@synchronized(self) { @synchronized(self) {
long nextId = ++requestId; long nextId = ++requestId;
if(loggingEnabled) if([[SWGConfiguration sharedConfig] debug])
NSLog(@"got id %ld", nextId); NSLog(@"got id %ld", nextId);
return [NSNumber numberWithLong:nextId]; return [NSNumber numberWithLong:nextId];
} }
@ -154,7 +161,7 @@ static bool loggingEnabled = true;
+(NSNumber*) queueRequest { +(NSNumber*) queueRequest {
NSNumber* requestId = [SWGApiClient nextRequestId]; NSNumber* requestId = [SWGApiClient nextRequestId];
if(loggingEnabled) if([[SWGConfiguration sharedConfig] debug])
NSLog(@"added %@ to request queue", requestId); NSLog(@"added %@ to request queue", requestId);
[queuedRequests addObject:requestId]; [queuedRequests addObject:requestId];
return requestId; return requestId;
@ -187,7 +194,7 @@ static bool loggingEnabled = true;
}]; }];
if(matchingItems.count == 1) { if(matchingItems.count == 1) {
if(loggingEnabled) if([[SWGConfiguration sharedConfig] debug])
NSLog(@"removing request id %@", requestId); NSLog(@"removing request id %@", requestId);
[queuedRequests removeObject:requestId]; [queuedRequests removeObject:requestId];
return true; return true;
@ -222,25 +229,25 @@ static bool loggingEnabled = true;
reachabilityStatus = status; reachabilityStatus = status;
switch (status) { switch (status) {
case AFNetworkReachabilityStatusUnknown: case AFNetworkReachabilityStatusUnknown:
if(loggingEnabled) if([[SWGConfiguration sharedConfig] debug])
NSLog(@"reachability changed to AFNetworkReachabilityStatusUnknown"); NSLog(@"reachability changed to AFNetworkReachabilityStatusUnknown");
[SWGApiClient setOfflineState:true]; [SWGApiClient setOfflineState:true];
break; break;
case AFNetworkReachabilityStatusNotReachable: case AFNetworkReachabilityStatusNotReachable:
if(loggingEnabled) if([[SWGConfiguration sharedConfig] debug])
NSLog(@"reachability changed to AFNetworkReachabilityStatusNotReachable"); NSLog(@"reachability changed to AFNetworkReachabilityStatusNotReachable");
[SWGApiClient setOfflineState:true]; [SWGApiClient setOfflineState:true];
break; break;
case AFNetworkReachabilityStatusReachableViaWWAN: case AFNetworkReachabilityStatusReachableViaWWAN:
if(loggingEnabled) if([[SWGConfiguration sharedConfig] debug])
NSLog(@"reachability changed to AFNetworkReachabilityStatusReachableViaWWAN"); NSLog(@"reachability changed to AFNetworkReachabilityStatusReachableViaWWAN");
[SWGApiClient setOfflineState:false]; [SWGApiClient setOfflineState:false];
break; break;
case AFNetworkReachabilityStatusReachableViaWiFi: case AFNetworkReachabilityStatusReachableViaWiFi:
if(loggingEnabled) if([[SWGConfiguration sharedConfig] debug])
NSLog(@"reachability changed to AFNetworkReachabilityStatusReachableViaWiFi"); NSLog(@"reachability changed to AFNetworkReachabilityStatusReachableViaWiFi");
[SWGApiClient setOfflineState:false]; [SWGApiClient setOfflineState:false];
break; break;
@ -265,7 +272,6 @@ static bool loggingEnabled = true;
for(NSString * key in [queryParams keyEnumerator]){ for(NSString * key in [queryParams keyEnumerator]){
if(counter == 0) separator = @"?"; if(counter == 0) separator = @"?";
else separator = @"&"; else separator = @"&";
NSString * value;
id queryParam = [queryParams valueForKey:key]; id queryParam = [queryParams valueForKey:key];
if([queryParam isKindOfClass:[NSString class]]){ if([queryParam isKindOfClass:[NSString class]]){
[requestUrl appendString:[NSString stringWithFormat:@"%@%@=%@", separator, [requestUrl appendString:[NSString stringWithFormat:@"%@%@=%@", separator,
@ -311,11 +317,6 @@ static bool loggingEnabled = true;
return requestUrl; return requestUrl;
} }
- (NSString*)descriptionForRequest:(NSURLRequest*)request {
return [[request URL] absoluteString];
}
/** /**
* Update header and query params based on authentication settings * Update header and query params based on authentication settings
*/ */
@ -478,8 +479,8 @@ static bool loggingEnabled = true;
AFHTTPRequestOperation *op = [self HTTPRequestOperationWithRequest:request AFHTTPRequestOperation *op = [self HTTPRequestOperationWithRequest:request
success:^(AFHTTPRequestOperation *operation, id response) { success:^(AFHTTPRequestOperation *operation, id response) {
if([self executeRequestWithId:requestId]) { if([self executeRequestWithId:requestId]) {
if(self.logServerResponses) { if([[SWGConfiguration sharedConfig] debug]) {
[self logResponse:response forRequest:request error:nil]; [self logResponse:operation forRequest:request error:nil];
} }
completionBlock(response, nil); completionBlock(response, nil);
} }
@ -492,7 +493,7 @@ static bool loggingEnabled = true;
} }
NSError *augmentedError = [error initWithDomain:error.domain code:error.code userInfo:userInfo]; NSError *augmentedError = [error initWithDomain:error.domain code:error.code userInfo:userInfo];
if(self.logServerResponses) if([[SWGConfiguration sharedConfig] debug])
[self logResponse:nil forRequest:request error:augmentedError]; [self logResponse:nil forRequest:request error:augmentedError];
completionBlock(nil, augmentedError); completionBlock(nil, augmentedError);
} }
@ -548,7 +549,7 @@ static bool loggingEnabled = true;
NSError *augmentedError = [error initWithDomain:error.domain code:error.code userInfo:userInfo]; NSError *augmentedError = [error initWithDomain:error.domain code:error.code userInfo:userInfo];
if (self.logServerResponses) { if ([[SWGConfiguration sharedConfig] debug]) {
[self logResponse:nil forRequest:request error:augmentedError]; [self logResponse:nil forRequest:request error:augmentedError];
} }

View File

@ -28,6 +28,13 @@
*/ */
@property (nonatomic) NSString *tempFolderPath; @property (nonatomic) NSString *tempFolderPath;
/**
* Logging Settings
*/
@property (nonatomic) BOOL debug;
@property (nonatomic) NSString *loggingFile;
@property (nonatomic) NSFileHandle *loggingFileHanlder;
/** /**
* Get configuration singleton instance * Get configuration singleton instance
*/ */

View File

@ -28,6 +28,8 @@
self.username = @""; self.username = @"";
self.password = @""; self.password = @"";
self.tempFolderPath = nil; self.tempFolderPath = nil;
self.debug = NO;
self.loggingFile = nil;
self.mutableApiKey = [NSMutableDictionary dictionary]; self.mutableApiKey = [NSMutableDictionary dictionary];
self.mutableApiKeyPrefix = [NSMutableDictionary dictionary]; self.mutableApiKeyPrefix = [NSMutableDictionary dictionary];
} }
@ -66,6 +68,20 @@
[self.mutableApiKeyPrefix setValue:value forKey:field]; [self.mutableApiKeyPrefix setValue:value forKey:field];
} }
- (void) setLoggingFile:(NSString *)loggingFile {
// close old file handler
if ([self.loggingFileHanlder isKindOfClass:[NSFileHandle class]]) {
[self.loggingFileHanlder closeFile];
}
_loggingFile = loggingFile;
self.loggingFileHanlder = [NSFileHandle fileHandleForWritingAtPath:_loggingFile];
if (self.loggingFileHanlder == nil) {
[[NSFileManager defaultManager] createFileAtPath:_loggingFile contents:nil attributes:nil];
self.loggingFileHanlder = [NSFileHandle fileHandleForWritingAtPath:_loggingFile];
}
}
#pragma mark - Getter Methods #pragma mark - Getter Methods
- (NSDictionary *) apiKey { - (NSDictionary *) apiKey {

View File

@ -1,5 +1,5 @@
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import "JSONModel.h" #import <JSONModel/JSONModel.h>
@interface SWGObject : JSONModel @interface SWGObject : JSONModel
@end @end

View File

@ -1,5 +1,4 @@
#import "SWGPetApi.h" #import "SWGPetApi.h"
#import "SWGFile.h"
#import "SWGQueryParamCollection.h" #import "SWGQueryParamCollection.h"
#import "SWGPet.h" #import "SWGPet.h"

View File

@ -1,5 +1,4 @@
#import "SWGStoreApi.h" #import "SWGStoreApi.h"
#import "SWGFile.h"
#import "SWGQueryParamCollection.h" #import "SWGQueryParamCollection.h"
#import "SWGOrder.h" #import "SWGOrder.h"

View File

@ -1,5 +1,4 @@
#import "SWGUserApi.h" #import "SWGUserApi.h"
#import "SWGFile.h"
#import "SWGQueryParamCollection.h" #import "SWGQueryParamCollection.h"
#import "SWGUser.h" #import "SWGUser.h"

View File

@ -1,5 +1,4 @@
source 'https://github.com/CocoaPods/Specs.git' source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!
target 'SwaggerClient_Example', :exclusive => true do target 'SwaggerClient_Example', :exclusive => true do
pod "SwaggerClient", :path => "../" pod "SwaggerClient", :path => "../"

View File

@ -7,7 +7,7 @@
objects = { objects = {
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
32FA3CA96E7FC5D792D203F8 /* Pods_SwaggerClient_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 56767C6E86DE2B2855ABF7B2 /* Pods_SwaggerClient_Example.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; 158CE3AA214CB1B31C7ADC48 /* libPods-SwaggerClient_Tests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FDEF5BA3CF9CFFDEB5A47DB4 /* libPods-SwaggerClient_Tests.a */; };
6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; };
6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; }; 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; };
6003F592195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; 6003F592195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; };
@ -22,7 +22,7 @@
6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5B8195388D20070C39A /* InfoPlist.strings */; }; 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5B8195388D20070C39A /* InfoPlist.strings */; };
6003F5BC195388D20070C39A /* Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5BB195388D20070C39A /* Tests.m */; }; 6003F5BC195388D20070C39A /* Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5BB195388D20070C39A /* Tests.m */; };
873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */; }; 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */; };
9A44FA36F7AE066E0FA82C4E /* Pods_SwaggerClient_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B1D1ECCC8D1A8BE115A67138 /* Pods_SwaggerClient_Tests.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; 94BE6BE84795B5034A811E61 /* libPods-SwaggerClient_Example.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D46325ECAD48245C07F6733 /* libPods-SwaggerClient_Example.a */; };
CFDFB4121B3CFFA8009739C5 /* UserApiTest.m in Sources */ = {isa = PBXBuildFile; fileRef = CFDFB40D1B3CFEC3009739C5 /* UserApiTest.m */; }; CFDFB4121B3CFFA8009739C5 /* UserApiTest.m in Sources */ = {isa = PBXBuildFile; fileRef = CFDFB40D1B3CFEC3009739C5 /* UserApiTest.m */; };
CFDFB4131B3CFFDD009739C5 /* PetApiTest.m in Sources */ = {isa = PBXBuildFile; fileRef = CFDFB40A1B3CFEC3009739C5 /* PetApiTest.m */; }; CFDFB4131B3CFFDD009739C5 /* PetApiTest.m in Sources */ = {isa = PBXBuildFile; fileRef = CFDFB40A1B3CFEC3009739C5 /* PetApiTest.m */; };
CFDFB4141B3CFFF6009739C5 /* StoreApiTest.m in Sources */ = {isa = PBXBuildFile; fileRef = CFDFB40B1B3CFEC3009739C5 /* StoreApiTest.m */; }; CFDFB4141B3CFFF6009739C5 /* StoreApiTest.m in Sources */ = {isa = PBXBuildFile; fileRef = CFDFB40B1B3CFEC3009739C5 /* StoreApiTest.m */; };
@ -42,7 +42,6 @@
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
1A81C3BE3E54961CD827EAE3 /* Pods-SwaggerClient_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests.release.xcconfig"; sourceTree = "<group>"; }; 1A81C3BE3E54961CD827EAE3 /* Pods-SwaggerClient_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests.release.xcconfig"; sourceTree = "<group>"; };
4CCE21315897B7D544C83242 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = "<group>"; }; 4CCE21315897B7D544C83242 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = "<group>"; };
56767C6E86DE2B2855ABF7B2 /* Pods_SwaggerClient_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwaggerClient_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
6003F58A195388D20070C39A /* SwaggerClient_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwaggerClient_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 6003F58A195388D20070C39A /* SwaggerClient_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwaggerClient_Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
6003F58D195388D20070C39A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 6003F58D195388D20070C39A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
6003F58F195388D20070C39A /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 6003F58F195388D20070C39A /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
@ -64,7 +63,7 @@
606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Tests-Prefix.pch"; sourceTree = "<group>"; }; 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Tests-Prefix.pch"; sourceTree = "<group>"; };
73CCD82196AABD64F2807C7B /* Pods-SwaggerClient_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests.debug.xcconfig"; sourceTree = "<group>"; }; 73CCD82196AABD64F2807C7B /* Pods-SwaggerClient_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests.debug.xcconfig"; sourceTree = "<group>"; };
873B8AEA1B1F5CCA007FD442 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = "<group>"; }; 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = "<group>"; };
B1D1ECCC8D1A8BE115A67138 /* Pods_SwaggerClient_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwaggerClient_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 8D46325ECAD48245C07F6733 /* libPods-SwaggerClient_Example.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-SwaggerClient_Example.a"; sourceTree = BUILT_PRODUCTS_DIR; };
BFB4BE760737508B3CFC23B2 /* Pods-SwaggerClient_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example.release.xcconfig"; sourceTree = "<group>"; }; BFB4BE760737508B3CFC23B2 /* Pods-SwaggerClient_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example.release.xcconfig"; sourceTree = "<group>"; };
CFDFB40A1B3CFEC3009739C5 /* PetApiTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PetApiTest.m; sourceTree = "<group>"; }; CFDFB40A1B3CFEC3009739C5 /* PetApiTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PetApiTest.m; sourceTree = "<group>"; };
CFDFB40B1B3CFEC3009739C5 /* StoreApiTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StoreApiTest.m; sourceTree = "<group>"; }; CFDFB40B1B3CFEC3009739C5 /* StoreApiTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StoreApiTest.m; sourceTree = "<group>"; };
@ -72,6 +71,7 @@
CFDFB40D1B3CFEC3009739C5 /* UserApiTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UserApiTest.m; sourceTree = "<group>"; }; CFDFB40D1B3CFEC3009739C5 /* UserApiTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UserApiTest.m; sourceTree = "<group>"; };
E445A633FA767F207D7EE6CE /* Pods-SwaggerClient_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example.debug.xcconfig"; sourceTree = "<group>"; }; E445A633FA767F207D7EE6CE /* Pods-SwaggerClient_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example.debug.xcconfig"; sourceTree = "<group>"; };
E9675D953C6DCDE71A1BDFD4 /* SwaggerClient.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = SwaggerClient.podspec; path = ../SwaggerClient.podspec; sourceTree = "<group>"; }; E9675D953C6DCDE71A1BDFD4 /* SwaggerClient.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = SwaggerClient.podspec; path = ../SwaggerClient.podspec; sourceTree = "<group>"; };
FDEF5BA3CF9CFFDEB5A47DB4 /* libPods-SwaggerClient_Tests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-SwaggerClient_Tests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */ /* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */ /* Begin PBXFrameworksBuildPhase section */
@ -82,7 +82,7 @@
6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */, 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */,
6003F592195388D20070C39A /* UIKit.framework in Frameworks */, 6003F592195388D20070C39A /* UIKit.framework in Frameworks */,
6003F58E195388D20070C39A /* Foundation.framework in Frameworks */, 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */,
32FA3CA96E7FC5D792D203F8 /* Pods_SwaggerClient_Example.framework in Frameworks */, 94BE6BE84795B5034A811E61 /* libPods-SwaggerClient_Example.a in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@ -93,7 +93,7 @@
6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */, 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */,
6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */, 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */,
6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */, 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */,
9A44FA36F7AE066E0FA82C4E /* Pods_SwaggerClient_Tests.framework in Frameworks */, 158CE3AA214CB1B31C7ADC48 /* libPods-SwaggerClient_Tests.a in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@ -128,8 +128,8 @@
6003F58F195388D20070C39A /* CoreGraphics.framework */, 6003F58F195388D20070C39A /* CoreGraphics.framework */,
6003F591195388D20070C39A /* UIKit.framework */, 6003F591195388D20070C39A /* UIKit.framework */,
6003F5AF195388D20070C39A /* XCTest.framework */, 6003F5AF195388D20070C39A /* XCTest.framework */,
56767C6E86DE2B2855ABF7B2 /* Pods_SwaggerClient_Example.framework */, 8D46325ECAD48245C07F6733 /* libPods-SwaggerClient_Example.a */,
B1D1ECCC8D1A8BE115A67138 /* Pods_SwaggerClient_Tests.framework */, FDEF5BA3CF9CFFDEB5A47DB4 /* libPods-SwaggerClient_Tests.a */,
); );
name = Frameworks; name = Frameworks;
sourceTree = "<group>"; sourceTree = "<group>";
@ -214,7 +214,6 @@
6003F586195388D20070C39A /* Sources */, 6003F586195388D20070C39A /* Sources */,
6003F587195388D20070C39A /* Frameworks */, 6003F587195388D20070C39A /* Frameworks */,
6003F588195388D20070C39A /* Resources */, 6003F588195388D20070C39A /* Resources */,
CFCA721F9D6FBA792A2E917F /* Embed Pods Frameworks */,
429AF5C69E165ED75311B4B0 /* Copy Pods Resources */, 429AF5C69E165ED75311B4B0 /* Copy Pods Resources */,
); );
buildRules = ( buildRules = (
@ -234,7 +233,6 @@
6003F5AA195388D20070C39A /* Sources */, 6003F5AA195388D20070C39A /* Sources */,
6003F5AB195388D20070C39A /* Frameworks */, 6003F5AB195388D20070C39A /* Frameworks */,
6003F5AC195388D20070C39A /* Resources */, 6003F5AC195388D20070C39A /* Resources */,
373B17801C82424AA96FEEFA /* Embed Pods Frameworks */,
E337D7E459CCFFDF27046FFC /* Copy Pods Resources */, E337D7E459CCFFDF27046FFC /* Copy Pods Resources */,
); );
buildRules = ( buildRules = (
@ -256,11 +254,6 @@
CLASSPREFIX = SWG; CLASSPREFIX = SWG;
LastUpgradeCheck = 0510; LastUpgradeCheck = 0510;
ORGANIZATIONNAME = geekerzp; ORGANIZATIONNAME = geekerzp;
TargetAttributes = {
6003F5AD195388D20070C39A = {
TestTargetID = 6003F589195388D20070C39A;
};
};
}; };
buildConfigurationList = 6003F585195388D10070C39A /* Build configuration list for PBXProject "SwaggerClient" */; buildConfigurationList = 6003F585195388D10070C39A /* Build configuration list for PBXProject "SwaggerClient" */;
compatibilityVersion = "Xcode 3.2"; compatibilityVersion = "Xcode 3.2";
@ -303,21 +296,6 @@
/* End PBXResourcesBuildPhase section */ /* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */
373B17801C82424AA96FEEFA /* Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
429AF5C69E165ED75311B4B0 /* Copy Pods Resources */ = { 429AF5C69E165ED75311B4B0 /* Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
@ -363,21 +341,6 @@
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
showEnvVarsInLog = 0; showEnvVarsInLog = 0;
}; };
CFCA721F9D6FBA792A2E917F /* Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
E337D7E459CCFFDF27046FFC /* Copy Pods Resources */ = { E337D7E459CCFFDF27046FFC /* Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
@ -554,7 +517,6 @@
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
baseConfigurationReference = 73CCD82196AABD64F2807C7B /* Pods-SwaggerClient_Tests.debug.xcconfig */; baseConfigurationReference = 73CCD82196AABD64F2807C7B /* Pods-SwaggerClient_Tests.debug.xcconfig */;
buildSettings = { buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks", "$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)", "$(inherited)",
@ -568,7 +530,6 @@
); );
INFOPLIST_FILE = "Tests/Tests-Info.plist"; INFOPLIST_FILE = "Tests/Tests-Info.plist";
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwaggerClient_Example.app/SwaggerClient_Example";
WRAPPER_EXTENSION = xctest; WRAPPER_EXTENSION = xctest;
}; };
name = Debug; name = Debug;
@ -577,7 +538,6 @@
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
baseConfigurationReference = 1A81C3BE3E54961CD827EAE3 /* Pods-SwaggerClient_Tests.release.xcconfig */; baseConfigurationReference = 1A81C3BE3E54961CD827EAE3 /* Pods-SwaggerClient_Tests.release.xcconfig */;
buildSettings = { buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks", "$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)", "$(inherited)",
@ -587,7 +547,6 @@
GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch"; GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch";
INFOPLIST_FILE = "Tests/Tests-Info.plist"; INFOPLIST_FILE = "Tests/Tests-Info.plist";
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwaggerClient_Example.app/SwaggerClient_Example";
WRAPPER_EXTENSION = xctest; WRAPPER_EXTENSION = xctest;
}; };
name = Release; name = Release;

View File

@ -1,7 +1,7 @@
#import <XCTest/XCTest.h> #import <XCTest/XCTest.h>
#import <SwaggerClient/SWGApiClient.h> #import <SwaggerClient/SWGApiClient.h>
#import <SwaggerClient/SWGFile.h>
#import <SwaggerClient/SWGPetApi.h> #import <SwaggerClient/SWGPetApi.h>
#import <SwaggerClient/SWGPet.h>
@interface PetApiTest : XCTestCase { @interface PetApiTest : XCTestCase {
@private @private

View File

@ -2,7 +2,7 @@
#ifdef __OBJC__ #ifdef __OBJC__
@import Specta; //@import Specta;
@import Expecta; //@import Expecta;
#endif #endif