Permalink
Browse files

Project and file templates added

  • Loading branch information...
1 parent 4e58c84 commit 86033576215205e8f3d8e6325516770bd9920bc9 @keremk committed Apr 9, 2009
Showing with 2,681 additions and 0 deletions.
  1. +4 −0 FileTemplate/Unit Test Case class.pbfiletemplate/TemplateInfo.plist
  2. +51 −0 FileTemplate/Unit Test Case class.pbfiletemplate/class.m
  3. BIN ProjectTemplate/CVStaticLibrary.xcodeproj/TemplateIcon.icns
  4. +9 −0 ProjectTemplate/CVStaticLibrary.xcodeproj/TemplateInfo.plist
  5. +435 −0 ProjectTemplate/CVStaticLibrary.xcodeproj/project.pbxproj
  6. +23 −0 ProjectTemplate/CVStaticLibrary_Prefix.pch
  7. +1 −0 ProjectTemplate/Frameworks/OCMock.framework/Headers
  8. +1 −0 ProjectTemplate/Frameworks/OCMock.framework/OCMock
  9. +1 −0 ProjectTemplate/Frameworks/OCMock.framework/Resources
  10. +28 −0 ProjectTemplate/Frameworks/OCMock.framework/Versions/A/Headers/OCMConstraint.h
  11. +8 −0 ProjectTemplate/Frameworks/OCMock.framework/Versions/A/Headers/OCMock.h
  12. +29 −0 ProjectTemplate/Frameworks/OCMock.framework/Versions/A/Headers/OCMockObject.h
  13. +33 −0 ProjectTemplate/Frameworks/OCMock.framework/Versions/A/Headers/OCMockRecorder.h
  14. BIN ProjectTemplate/Frameworks/OCMock.framework/Versions/A/OCMock
  15. BIN ProjectTemplate/Frameworks/OCMock.framework/Versions/A/Resources/English.lproj/InfoPlist.strings
  16. +20 −0 ProjectTemplate/Frameworks/OCMock.framework/Versions/A/Resources/Info.plist
  17. +15 −0 ProjectTemplate/Frameworks/OCMock.framework/Versions/A/Resources/License.txt
  18. +1 −0 ProjectTemplate/Frameworks/OCMock.framework/Versions/Current
  19. +241 −0 ProjectTemplate/GTMDefines.h
  20. +38 −0 ProjectTemplate/GTMIPhoneUnitTestDelegate.h
  21. +206 −0 ProjectTemplate/GTMIPhoneUnitTestDelegate.m
  22. +33 −0 ProjectTemplate/GTMIPhoneUnitTestMain.m
  23. +1,004 −0 ProjectTemplate/GTMSenTestCase.h
  24. +366 −0 ProjectTemplate/GTMSenTestCase.m
  25. +114 −0 ProjectTemplate/RunIPhoneUnitTest.sh
  26. +20 −0 ProjectTemplate/UnitTest-Info.plist
@@ -0,0 +1,4 @@
+{
+ MainTemplateFile = "class.m";
+ Description = "An Objective-C class containing an Google Toolkit for Mac based OCUnit and OCMock test case, without the header file. The main .m file includes the <OCMock/OCMock.h>, <OCMock/OCMConstraint.h>, \"GTMSenTestCase.h\" and <UIKit/UIKit.h> headers.";
+}
@@ -0,0 +1,51 @@
+//
+// «FILENAME»
+// «PROJECTNAME»
+//
+// Created by «FULLUSERNAME» on «DATE».
+// Copyright «YEAR» «ORGANIZATIONNAME». All rights reserved.
+//
+// Link to Google Toolbox For Mac (IPhone Unit Test):
+// http://code.google.com/p/google-toolbox-for-mac/wiki/iPhoneUnitTesting
+// Link to OCUnit: http://www.sente.ch/s/?p=276&lang=en
+// Link to OCMock: http://www.mulle-kybernetik.com/software/OCMock/
+
+«OPTIONALHEADERIMPORTLINE»
+
+#import <UIKit/UIKit.h>
+#import <OCMock/OCMock.h>
+#import <OCMock/OCMConstraint.h>
+#import "GTMSenTestCase.h"
+//#import "application_headers" as required
+
+@interface «FILEBASENAMEASIDENTIFIER» : GTMTestCase {
+ id mock; // Mock object used in tests
+}
+@end
+
+@implementation «FILEBASENAMEASIDENTIFIER»
+
+#if TARGET_IPHONE_SIMULATOR // Only run when the target is simulator
+
+- (void) setUp {
+ mock = [OCMockObject mockForClass:[NSString class]]; // create your mock objects here
+ // Create shared data structures here
+}
+
+// Start all test methods with testXXX
+- (void) testMath {
+ STAssertTrue((1+1)==2, @"Compiler isn't feeling well today :-(" );
+}
+
+- (void) testRaisesExceptionWhenWrongMethodIsCalled {
+ [[mock stub] lowercaseString]; // Telling the mock object about a method
+ STAssertThrows([mock uppercaseString], @"Should have raised an exception.");
+}
+
+- (void) tearDown {
+ // Release data structures here.
+}
+
+#endif
+
+@end
Binary file not shown.
@@ -0,0 +1,9 @@
+{
+ FilesToRename = {
+ "CVStaticLibrary_Prefix.pch" = "«PROJECTNAME»_Prefix.pch";
+ };
+ FilesToMacroExpand = (
+ "«PROJECTNAME»_Prefix.pch",
+ );
+ Description = "This project builds a static library that links against the IPhone framework.";
+}
Oops, something went wrong.

0 comments on commit 8603357

Please sign in to comment.