chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gavincornw...@apache.org
Subject svn commit: r1576068 [1/2] - in /chemistry/objectivecmis/trunk: ObjectiveCMIS.xcodeproj/project.pbxproj ObjectiveCMISTests/CMISBaseTest.h ObjectiveCMISTests/CMISBaseTest.m ObjectiveCMISTests/ObjectiveCMISTests.h ObjectiveCMISTests/ObjectiveCMISTests.m
Date Mon, 10 Mar 2014 20:27:26 GMT
Author: gavincornwell
Date: Mon Mar 10 20:27:26 2014
New Revision: 1576068

URL: http://svn.apache.org/r1576068
Log:
Migrated unit tests to use XCUnit from SenTest

Modified:
    chemistry/objectivecmis/trunk/ObjectiveCMIS.xcodeproj/project.pbxproj
    chemistry/objectivecmis/trunk/ObjectiveCMISTests/CMISBaseTest.h
    chemistry/objectivecmis/trunk/ObjectiveCMISTests/CMISBaseTest.m
    chemistry/objectivecmis/trunk/ObjectiveCMISTests/ObjectiveCMISTests.h
    chemistry/objectivecmis/trunk/ObjectiveCMISTests/ObjectiveCMISTests.m

Modified: chemistry/objectivecmis/trunk/ObjectiveCMIS.xcodeproj/project.pbxproj
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS.xcodeproj/project.pbxproj?rev=1576068&r1=1576067&r2=1576068&view=diff
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS.xcodeproj/project.pbxproj (original)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS.xcodeproj/project.pbxproj Mon Mar 10 20:27:26
2014
@@ -86,7 +86,6 @@
 		8276E15A155E392A00344A29 /* CMISRepositoryService.h in Headers */ = {isa = PBXBuildFile;
fileRef = 8276E157155E392A00344A29 /* CMISRepositoryService.h */; settings = {ATTRIBUTES =
(Public, ); }; };
 		8276E15B155E392A00344A29 /* CMISVersioningService.h in Headers */ = {isa = PBXBuildFile;
fileRef = 8276E158155E392A00344A29 /* CMISVersioningService.h */; settings = {ATTRIBUTES =
(Public, ); }; };
 		828072A715153DE800EF635C /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile;
fileRef = 828072A615153DE800EF635C /* Foundation.framework */; };
-		828072B515153DE900EF635C /* SenTestingKit.framework in Frameworks */ = {isa = PBXBuildFile;
fileRef = 828072B415153DE900EF635C /* SenTestingKit.framework */; };
 		828072B815153DE900EF635C /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile;
fileRef = 828072A615153DE800EF635C /* Foundation.framework */; };
 		828072BB15153DE900EF635C /* libObjectiveCMIS.a in Frameworks */ = {isa = PBXBuildFile;
fileRef = 828072A315153DE800EF635C /* libObjectiveCMIS.a */; };
 		828072C115153DE900EF635C /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef
= 828072BF15153DE900EF635C /* InfoPlist.strings */; };
@@ -281,8 +280,7 @@
 		828072A315153DE800EF635C /* libObjectiveCMIS.a */ = {isa = PBXFileReference; explicitFileType
= archive.ar; includeInIndex = 0; path = libObjectiveCMIS.a; sourceTree = BUILT_PRODUCTS_DIR;
};
 		828072A615153DE800EF635C /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType
= wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework;
sourceTree = SDKROOT; };
 		828072AA15153DE800EF635C /* ObjectiveCMIS-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType
= sourcecode.c.h; path = "ObjectiveCMIS-Prefix.pch"; sourceTree = "<group>"; };
-		828072B315153DE900EF635C /* ObjectiveCMISTests.octest */ = {isa = PBXFileReference; explicitFileType
= wrapper.cfbundle; includeInIndex = 0; path = ObjectiveCMISTests.octest; sourceTree = BUILT_PRODUCTS_DIR;
};
-		828072B415153DE900EF635C /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType
= wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework;
sourceTree = DEVELOPER_DIR; };
+		828072B315153DE900EF635C /* ObjectiveCMISTests.xctest */ = {isa = PBXFileReference; explicitFileType
= wrapper.cfbundle; includeInIndex = 0; path = ObjectiveCMISTests.xctest; sourceTree = BUILT_PRODUCTS_DIR;
};
 		828072BE15153DE900EF635C /* ObjectiveCMISTests-Info.plist */ = {isa = PBXFileReference;
lastKnownFileType = text.plist.xml; path = "ObjectiveCMISTests-Info.plist"; sourceTree = "<group>";
};
 		828072C015153DE900EF635C /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings;
name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
 		828072C215153DE900EF635C /* ObjectiveCMISTests.h */ = {isa = PBXFileReference; lastKnownFileType
= sourcecode.c.h; path = ObjectiveCMISTests.h; sourceTree = "<group>"; };
@@ -416,7 +414,6 @@
 			buildActionMask = 2147483647;
 			files = (
 				828073DE15154F9400EF635C /* MobileCoreServices.framework in Frameworks */,
-				828072B515153DE900EF635C /* SenTestingKit.framework in Frameworks */,
 				828072B815153DE900EF635C /* Foundation.framework in Frameworks */,
 				828072BB15153DE900EF635C /* libObjectiveCMIS.a in Frameworks */,
 			);
@@ -466,7 +463,7 @@
 			isa = PBXGroup;
 			children = (
 				828072A315153DE800EF635C /* libObjectiveCMIS.a */,
-				828072B315153DE900EF635C /* ObjectiveCMISTests.octest */,
+				828072B315153DE900EF635C /* ObjectiveCMISTests.xctest */,
 			);
 			name = Products;
 			sourceTree = "<group>";
@@ -476,7 +473,6 @@
 			children = (
 				82807383151542F400EF635C /* MobileCoreServices.framework */,
 				828072A615153DE800EF635C /* Foundation.framework */,
-				828072B415153DE900EF635C /* SenTestingKit.framework */,
 			);
 			name = Frameworks;
 			sourceTree = "<group>";
@@ -857,8 +853,8 @@
 			);
 			name = ObjectiveCMISTests;
 			productName = ObjectiveCMISTests;
-			productReference = 828072B315153DE900EF635C /* ObjectiveCMISTests.octest */;
-			productType = "com.apple.product-type.bundle";
+			productReference = 828072B315153DE900EF635C /* ObjectiveCMISTests.xctest */;
+			productType = "com.apple.product-type.bundle.unit-test";
 		};
 /* End PBXNativeTarget section */
 
@@ -1187,14 +1183,12 @@
 			buildSettings = {
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(SDKROOT)/Developer/Library/Frameworks",
-					"$(DEVELOPER_LIBRARY_DIR)/Frameworks",
+					"$(inherited)",
 				);
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
 				GCC_PREFIX_HEADER = "ObjectiveCMIS/ObjectiveCMIS-Prefix.pch";
 				INFOPLIST_FILE = "ObjectiveCMISTests/ObjectiveCMISTests-Info.plist";
 				PRODUCT_NAME = "$(TARGET_NAME)";
-				TEST_AFTER_BUILD = NO;
-				WRAPPER_EXTENSION = octest;
 			};
 			name = Debug;
 		};
@@ -1203,14 +1197,12 @@
 			buildSettings = {
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(SDKROOT)/Developer/Library/Frameworks",
-					"$(DEVELOPER_LIBRARY_DIR)/Frameworks",
+					"$(inherited)",
 				);
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
 				GCC_PREFIX_HEADER = "ObjectiveCMIS/ObjectiveCMIS-Prefix.pch";
 				INFOPLIST_FILE = "ObjectiveCMISTests/ObjectiveCMISTests-Info.plist";
 				PRODUCT_NAME = "$(TARGET_NAME)";
-				TEST_AFTER_BUILD = NO;
-				WRAPPER_EXTENSION = octest;
 			};
 			name = Release;
 		};

Modified: chemistry/objectivecmis/trunk/ObjectiveCMISTests/CMISBaseTest.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMISTests/CMISBaseTest.h?rev=1576068&r1=1576067&r2=1576068&view=diff
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMISTests/CMISBaseTest.h (original)
+++ chemistry/objectivecmis/trunk/ObjectiveCMISTests/CMISBaseTest.h Mon Mar 10 20:27:26 2014
@@ -18,7 +18,7 @@
  */
  
 #import <Foundation/Foundation.h>
-#import <SenTestingKit/SenTestingKit.h>
+#import <XCTest/XCTest.h>
 #import "CMISDocument.h"
 
 @class CMISFolder;
@@ -27,7 +27,7 @@
 
 typedef void (^CMISTestBlock)(void);
 
-@interface CMISBaseTest : SenTestCase
+@interface CMISBaseTest : XCTestCase
 
 @property (nonatomic, strong) CMISSessionParameters *parameters;
 @property (nonatomic, strong) CMISSession *session;

Modified: chemistry/objectivecmis/trunk/ObjectiveCMISTests/CMISBaseTest.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMISTests/CMISBaseTest.m?rev=1576068&r1=1576067&r2=1576068&view=diff
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMISTests/CMISBaseTest.m (original)
+++ chemistry/objectivecmis/trunk/ObjectiveCMISTests/CMISBaseTest.m Mon Mar 10 20:27:26 2014
@@ -33,16 +33,16 @@
 - (void) runTest:(CMISTestBlock)testBlock withExtraSessionParameters:(NSDictionary *)extraSessionParameters
 {
     NSBundle *bundle = [NSBundle bundleForClass:[self class]];
-    STAssertNotNil(bundle, @"Bundle is nil!");
+    XCTAssertNotNil(bundle, @"Bundle is nil!");
 
     NSString *envsPListPath = [bundle pathForResource:@"env-cfg" ofType:@"plist"];
-    STAssertNotNil(envsPListPath, @"envsPListPath is nil!");
+    XCTAssertNotNil(envsPListPath, @"envsPListPath is nil!");
 
     NSDictionary *environmentsDict = [[NSDictionary alloc] initWithContentsOfFile:envsPListPath];
-    STAssertNotNil(environmentsDict, @"environmentsDict is nil!");
+    XCTAssertNotNil(environmentsDict, @"environmentsDict is nil!");
 
     NSArray *environmentArray = [environmentsDict objectForKey:@"environments"];
-    STAssertNotNil(environmentArray, @"environmentArray is nil!");
+    XCTAssertNotNil(environmentArray, @"environmentArray is nil!");
 
     for (NSDictionary *envDict in environmentArray) {
         NSString *url = [envDict valueForKey:@"url"];
@@ -91,11 +91,11 @@
 
         } else {
             self.session = session;
-            STAssertTrue(self.session.isAuthenticated, @"Session should be authenticated");
+            XCTAssertTrue(self.session.isAuthenticated, @"Session should be authenticated");
             [self.session retrieveRootFolderWithCompletionBlock:^(CMISFolder *rootFolder,
NSError *error) {
                 self.rootFolder = rootFolder;
-                STAssertNil(error, @"Error while retrieving root folder: %@", [error description]);
-                STAssertNotNil(self.rootFolder, @"rootFolder object should not be nil");
+                XCTAssertNil(error, @"Error while retrieving root folder: %@", [error description]);
+                XCTAssertNotNil(self.rootFolder, @"rootFolder object should not be nil");
                 
                 completionBlock();
             }];
@@ -106,7 +106,7 @@
 
 - (NSDictionary *)customCmisParameters
 {
-    // Ment to be overridden.
+    // Meant to be overridden.
     return nil;
 }
 
@@ -116,10 +116,10 @@
 {
     [self.session retrieveObjectByPath:@"/ios-test/versioned-quote.txt" completionBlock:^(CMISObject
*object, NSError *error) {
         CMISDocument *document = (CMISDocument *)object;
-        STAssertNotNil(document, @"Did not find test document for versioning test");
-        STAssertTrue(document.isLatestVersion, @"Should have 'true' for the property 'isLatestVersion");
-        STAssertFalse(document.isLatestMajorVersion, @"Should have 'false' for the property
'isLatestMajorVersion"); // the latest version is a minor one
-        STAssertFalse(document.isMajorVersion, @"Should have 'false' for the property 'isMajorVersion");
+        XCTAssertNotNil(document, @"Did not find test document for versioning test");
+        XCTAssertTrue(document.isLatestVersion, @"Should have 'true' for the property 'isLatestVersion");
+        XCTAssertFalse(document.isLatestMajorVersion, @"Should have 'false' for the property
'isLatestMajorVersion"); // the latest version is a minor one
+        XCTAssertFalse(document.isMajorVersion, @"Should have 'false' for the property 'isMajorVersion");
         
         completionBlock(document);
     }];
@@ -146,19 +146,19 @@
                     
                     [self.session retrieveObject:objectId completionBlock:^(CMISObject *object,
NSError *error) {
                         CMISDocument *document = (CMISDocument *)object;
-                        STAssertNil(error, @"Got error while creating document: %@", [error
description]);
-                        STAssertNotNil(objectId, @"Object id received should be non-nil");
-                        STAssertNotNil(document, @"Retrieved document should not be nil");
+                        XCTAssertNil(error, @"Got error while creating document: %@", [error
description]);
+                        XCTAssertNotNil(objectId, @"Object id received should be non-nil");
+                        XCTAssertNotNil(document, @"Retrieved document should not be nil");
                         completionBlock(document);
                     }];
                 } else {
-                    STAssertNotNil(error, @"Object id should not be nil");
-                    STAssertNil(error, @"Got error while uploading document: %@", [error
description]);
+                    XCTAssertNotNil(error, @"Object id should not be nil");
+                    XCTAssertNil(error, @"Got error while uploading document: %@", [error
description]);
                 }
             }
             progressBlock: ^ (unsigned long long uploadedBytes, unsigned long long totalBytes)
             {
-                STAssertTrue((long long)uploadedBytes > previousUploadedBytes, @"no progress");
+                XCTAssertTrue((long long)uploadedBytes > previousUploadedBytes, @"no progress");
                 previousUploadedBytes = uploadedBytes;
             }];
 
@@ -171,7 +171,7 @@
         [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:timeoutDate];
     } while (!self.testCompleted && [timeoutDate timeIntervalSinceNow] > 0);
 
-    STAssertTrue(self.testCompleted, @"Test did not complete within %d seconds", (int)timeoutSecs);
+    XCTAssertTrue(self.testCompleted, @"Test did not complete within %d seconds", (int)timeoutSecs);
 
     self.testCompleted = NO;
 }
@@ -179,8 +179,8 @@
 - (void)deleteDocumentAndVerify:(CMISDocument *)document completionBlock:(void (^)(void))completionBlock
 {
     [document deleteAllVersionsWithCompletionBlock:^(BOOL documentDeleted, NSError *error)
{
-        STAssertNil(error, @"Error while deleting created document: %@", [error description]);
-        STAssertTrue(documentDeleted, @"Document was not deleted");
+        XCTAssertNil(error, @"Error while deleting created document: %@", [error description]);
+        XCTAssertTrue(documentDeleted, @"Document was not deleted");
         completionBlock();
     }];
 }

Modified: chemistry/objectivecmis/trunk/ObjectiveCMISTests/ObjectiveCMISTests.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMISTests/ObjectiveCMISTests.h?rev=1576068&r1=1576067&r2=1576068&view=diff
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMISTests/ObjectiveCMISTests.h (original)
+++ chemistry/objectivecmis/trunk/ObjectiveCMISTests/ObjectiveCMISTests.h Mon Mar 10 20:27:26
2014
@@ -17,7 +17,7 @@
   under the License.
  */
  
-#import <SenTestingKit/SenTestingKit.h>
+#import <XCTest/XCTest.h>
 #import "CMISSessionParameters.h"
 #import "CMISBaseTest.h"
 



Mime
View raw message