Skip to content

Commit

Permalink
* cleaned unit tests for OSX
Browse files Browse the repository at this point in the history
  • Loading branch information
icanzilb committed Nov 10, 2013
1 parent 692bc96 commit e2ee83d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
5 changes: 5 additions & 0 deletions JSONModelDemoTests/UnitTests/PrimitiveTypesReadTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@

#import "PrimitiveTypesReadTests.h"
#import "PrimitivesModel.h"

#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 60000
#import "EnumModel.h"
#endif

@implementation PrimitiveTypesReadTests
{
Expand Down Expand Up @@ -46,6 +49,7 @@ -(void)testPrimitiveTypes
STAssertTrue(p.boolYES==YES, @"boolYES read fail");
}

#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 60000
-(void)testEnumerationTypes
{
NSString* jsonContents = @"{\"statusString\":\"open\",\"nsStatus\":\"closed\",\"nsuStatus\":\"open\"}";
Expand All @@ -62,5 +66,6 @@ -(void)testEnumerationTypes

STAssertTrue([[p1 toJSONString] isEqualToString: jsonContents], @"Exporting enum value didn't work out");
}
#endif

@end
22 changes: 16 additions & 6 deletions JSONModelDemo_OSX.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
9C05B445168CEB220054215E /* github-iphone.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B401168CEB220054215E /* github-iphone.json */; };
9C05B446168CEB220054215E /* jsonTypes.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B402168CEB220054215E /* jsonTypes.json */; };
9C05B447168CEB220054215E /* nestedData.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B403168CEB220054215E /* nestedData.json */; };
9C05B448168CEB220054215E /* nestedDataWithErrors.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B404168CEB220054215E /* nestedDataWithErrors.json */; };
9C05B449168CEB220054215E /* post.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B405168CEB220054215E /* post.json */; };
9C05B44A168CEB220054215E /* primitives.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B406168CEB220054215E /* primitives.json */; };
9C05B44B168CEB220054215E /* primitivesWithErrors.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B407168CEB220054215E /* primitivesWithErrors.json */; };
Expand Down Expand Up @@ -54,7 +53,6 @@
9C66DF49168CEECF0015CCDF /* github-iphone.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B401168CEB220054215E /* github-iphone.json */; };
9C66DF4A168CEECF0015CCDF /* jsonTypes.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B402168CEB220054215E /* jsonTypes.json */; };
9C66DF4B168CEECF0015CCDF /* nestedData.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B403168CEB220054215E /* nestedData.json */; };
9C66DF4C168CEECF0015CCDF /* nestedDataWithErrors.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B404168CEB220054215E /* nestedDataWithErrors.json */; };
9C66DF4D168CEECF0015CCDF /* post.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B405168CEB220054215E /* post.json */; };
9C66DF4E168CEECF0015CCDF /* primitives.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B406168CEB220054215E /* primitives.json */; };
9C66DF4F168CEECF0015CCDF /* primitivesWithErrors.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C05B407168CEB220054215E /* primitivesWithErrors.json */; };
Expand All @@ -80,6 +78,10 @@
9C66E007168CF09A0015CCDF /* JSONKeyMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFF3168CF09A0015CCDF /* JSONKeyMapper.m */; };
9C66E008168CF09A0015CCDF /* JSONValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFF5168CF09A0015CCDF /* JSONValueTransformer.m */; };
9C66E009168CF09A0015CCDF /* JSONValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C66DFF5168CF09A0015CCDF /* JSONValueTransformer.m */; };
9C6C35DF181CF7B500BEE72D /* nestedDataWithArrayError.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C6C35DB181CF7B500BEE72D /* nestedDataWithArrayError.json */; };
9C6C35E0181CF7B500BEE72D /* nestedDataWithDictionaryError.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C6C35DC181CF7B500BEE72D /* nestedDataWithDictionaryError.json */; };
9C6C35E1181CF7B500BEE72D /* nestedDataWithTypeMismatchOnImages.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C6C35DD181CF7B500BEE72D /* nestedDataWithTypeMismatchOnImages.json */; };
9C6C35E2181CF7B500BEE72D /* nestedDataWithTypeMismatchOnImagesObject.json in Resources */ = {isa = PBXBuildFile; fileRef = 9C6C35DE181CF7B500BEE72D /* nestedDataWithTypeMismatchOnImagesObject.json */; };
9C72A49D171447F70047C6AE /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9C72A49C171447F70047C6AE /* SystemConfiguration.framework */; };
9C735D67170B717F00FF96F5 /* JSONAPITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C735D66170B717F00FF96F5 /* JSONAPITests.m */; };
9C735D6D170B7A2D00FF96F5 /* RpcRequestModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C735D6C170B7A2D00FF96F5 /* RpcRequestModel.m */; };
Expand Down Expand Up @@ -125,7 +127,6 @@
9C05B401168CEB220054215E /* github-iphone.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "github-iphone.json"; sourceTree = "<group>"; };
9C05B402168CEB220054215E /* jsonTypes.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = jsonTypes.json; sourceTree = "<group>"; };
9C05B403168CEB220054215E /* nestedData.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = nestedData.json; sourceTree = "<group>"; };
9C05B404168CEB220054215E /* nestedDataWithErrors.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = nestedDataWithErrors.json; sourceTree = "<group>"; };
9C05B405168CEB220054215E /* post.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = post.json; sourceTree = "<group>"; };
9C05B406168CEB220054215E /* primitives.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = primitives.json; sourceTree = "<group>"; };
9C05B407168CEB220054215E /* primitivesWithErrors.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = primitivesWithErrors.json; sourceTree = "<group>"; };
Expand Down Expand Up @@ -206,6 +207,10 @@
9C66DFF3168CF09A0015CCDF /* JSONKeyMapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONKeyMapper.m; sourceTree = "<group>"; };
9C66DFF4168CF09A0015CCDF /* JSONValueTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONValueTransformer.h; sourceTree = "<group>"; };
9C66DFF5168CF09A0015CCDF /* JSONValueTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONValueTransformer.m; sourceTree = "<group>"; };
9C6C35DB181CF7B500BEE72D /* nestedDataWithArrayError.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = nestedDataWithArrayError.json; sourceTree = "<group>"; };
9C6C35DC181CF7B500BEE72D /* nestedDataWithDictionaryError.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = nestedDataWithDictionaryError.json; sourceTree = "<group>"; };
9C6C35DD181CF7B500BEE72D /* nestedDataWithTypeMismatchOnImages.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = nestedDataWithTypeMismatchOnImages.json; sourceTree = "<group>"; };
9C6C35DE181CF7B500BEE72D /* nestedDataWithTypeMismatchOnImagesObject.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = nestedDataWithTypeMismatchOnImagesObject.json; sourceTree = "<group>"; };
9C72A49C171447F70047C6AE /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
9C735D65170B717F00FF96F5 /* JSONAPITests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONAPITests.h; sourceTree = "<group>"; };
9C735D66170B717F00FF96F5 /* JSONAPITests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONAPITests.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -357,7 +362,10 @@
9C05B401168CEB220054215E /* github-iphone.json */,
9C05B402168CEB220054215E /* jsonTypes.json */,
9C05B403168CEB220054215E /* nestedData.json */,
9C05B404168CEB220054215E /* nestedDataWithErrors.json */,
9C6C35DB181CF7B500BEE72D /* nestedDataWithArrayError.json */,
9C6C35DC181CF7B500BEE72D /* nestedDataWithDictionaryError.json */,
9C6C35DD181CF7B500BEE72D /* nestedDataWithTypeMismatchOnImages.json */,
9C6C35DE181CF7B500BEE72D /* nestedDataWithTypeMismatchOnImagesObject.json */,
9C05B405168CEB220054215E /* post.json */,
9C05B406168CEB220054215E /* primitives.json */,
9C05B407168CEB220054215E /* primitivesWithErrors.json */,
Expand Down Expand Up @@ -675,16 +683,19 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
9C6C35E0181CF7B500BEE72D /* nestedDataWithDictionaryError.json in Resources */,
9C05B443168CEB220054215E /* colors.json in Resources */,
9C05B444168CEB220054215E /* converts.json in Resources */,
9C05B445168CEB220054215E /* github-iphone.json in Resources */,
9C6C35DF181CF7B500BEE72D /* nestedDataWithArrayError.json in Resources */,
9C05B446168CEB220054215E /* jsonTypes.json in Resources */,
9C6C35E2181CF7B500BEE72D /* nestedDataWithTypeMismatchOnImagesObject.json in Resources */,
9C05B447168CEB220054215E /* nestedData.json in Resources */,
9C05B448168CEB220054215E /* nestedDataWithErrors.json in Resources */,
9C05B449168CEB220054215E /* post.json in Resources */,
9C05B44A168CEB220054215E /* primitives.json in Resources */,
9C05B44B168CEB220054215E /* primitivesWithErrors.json in Resources */,
D5F918E5172AD99600AC2C8E /* specialPropertyName.json in Resources */,
9C6C35E1181CF7B500BEE72D /* nestedDataWithTypeMismatchOnImages.json in Resources */,
9C05B44C168CEB220054215E /* withOptProp.json in Resources */,
9C05B44D168CEB220054215E /* withoutOptProp.json in Resources */,
);
Expand All @@ -703,7 +714,6 @@
9C66DF49168CEECF0015CCDF /* github-iphone.json in Resources */,
9C66DF4A168CEECF0015CCDF /* jsonTypes.json in Resources */,
9C66DF4B168CEECF0015CCDF /* nestedData.json in Resources */,
9C66DF4C168CEECF0015CCDF /* nestedDataWithErrors.json in Resources */,
9C66DF4D168CEECF0015CCDF /* post.json in Resources */,
9C66DF4E168CEECF0015CCDF /* primitives.json in Resources */,
9C66DF4F168CEECF0015CCDF /* primitivesWithErrors.json in Resources */,
Expand Down

0 comments on commit e2ee83d

Please sign in to comment.