创建单元测试文件。Review by 阿瑟。
Showing
16 changed files
with
609 additions
and
0 deletions
@@ -15,6 +15,21 @@ | @@ -15,6 +15,21 @@ | ||
15 | 194EDC841A7F52D100421E6C /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 194EDC821A7F52D100421E6C /* LaunchScreen.xib */; }; | 15 | 194EDC841A7F52D100421E6C /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 194EDC821A7F52D100421E6C /* LaunchScreen.xib */; }; |
16 | 194EDC901A7F52D100421E6C /* YH_AnalyticsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 194EDC8F1A7F52D100421E6C /* YH_AnalyticsTests.m */; }; | 16 | 194EDC901A7F52D100421E6C /* YH_AnalyticsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 194EDC8F1A7F52D100421E6C /* YH_AnalyticsTests.m */; }; |
17 | 194EDC9C1A7F555800421E6C /* YH_Analytics.m in Sources */ = {isa = PBXBuildFile; fileRef = 194EDC9B1A7F555800421E6C /* YH_Analytics.m */; }; | 17 | 194EDC9C1A7F555800421E6C /* YH_Analytics.m in Sources */ = {isa = PBXBuildFile; fileRef = 194EDC9B1A7F555800421E6C /* YH_Analytics.m */; }; |
18 | + CA7AC7831ADE06F300F30791 /* YHCrashReporterTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CA7AC7821ADE06F300F30791 /* YHCrashReporterTests.m */; }; | ||
19 | + CA7AC7851ADE073200F30791 /* NSString+YHAnalyticsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CA7AC7841ADE073200F30791 /* NSString+YHAnalyticsTests.m */; }; | ||
20 | + CA7AC7871ADE075E00F30791 /* YHNetworkAssistantTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CA7AC7861ADE075E00F30791 /* YHNetworkAssistantTests.m */; }; | ||
21 | + CA7AC7891ADE078200F30791 /* YHAssemblyAssistantTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CA7AC7881ADE078200F30791 /* YHAssemblyAssistantTests.m */; }; | ||
22 | + CA7AC78B1ADE079800F30791 /* YHNetworkUserAgentTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CA7AC78A1ADE079800F30791 /* YHNetworkUserAgentTests.m */; }; | ||
23 | + CA7AC78F1ADE08CA00F30791 /* YHDeviceTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CA7AC78E1ADE08CA00F30791 /* YHDeviceTests.m */; }; | ||
24 | + CA7AC7911ADE08DC00F30791 /* YHErrorTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CA7AC7901ADE08DC00F30791 /* YHErrorTests.m */; }; | ||
25 | + CA7AC7931ADE08F000F30791 /* YHEventTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CA7AC7921ADE08F000F30791 /* YHEventTests.m */; }; | ||
26 | + CA7AC7951ADE090800F30791 /* YHStatusTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CA7AC7941ADE090800F30791 /* YHStatusTests.m */; }; | ||
27 | + CA7AC7971ADE092300F30791 /* YHAnalyItemDataTest.m in Sources */ = {isa = PBXBuildFile; fileRef = CA7AC7961ADE092300F30791 /* YHAnalyItemDataTest.m */; }; | ||
28 | + CA7AC79A1ADE0BD500F30791 /* YHDataFactoryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CA7AC7991ADE0BD500F30791 /* YHDataFactoryTests.m */; }; | ||
29 | + CA7AC79C1ADE0C0800F30791 /* YHErrorFactoryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CA7AC79B1ADE0C0800F30791 /* YHErrorFactoryTests.m */; }; | ||
30 | + CA7AC79E1ADE0C3900F30791 /* YHDeviceFactoryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CA7AC79D1ADE0C3900F30791 /* YHDeviceFactoryTests.m */; }; | ||
31 | + CA7AC7A01ADE0C4F00F30791 /* YHEventFactoryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CA7AC79F1ADE0C4F00F30791 /* YHEventFactoryTests.m */; }; | ||
32 | + CA7AC7A21ADE0C6600F30791 /* YHStatusFactoryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CA7AC7A11ADE0C6600F30791 /* YHStatusFactoryTests.m */; }; | ||
18 | CABC32831AD7CEB8002A4260 /* libOCMock.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CABC32821AD7CEB8002A4260 /* libOCMock.a */; }; | 33 | CABC32831AD7CEB8002A4260 /* libOCMock.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CABC32821AD7CEB8002A4260 /* libOCMock.a */; }; |
19 | E74D45B21ABA7C6300EFE12E /* AFHTTPRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = E74D458E1ABA7C6300EFE12E /* AFHTTPRequestOperation.m */; }; | 34 | E74D45B21ABA7C6300EFE12E /* AFHTTPRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = E74D458E1ABA7C6300EFE12E /* AFHTTPRequestOperation.m */; }; |
20 | E74D45B31ABA7C6300EFE12E /* AFHTTPRequestOperationManager.m in Sources */ = {isa = PBXBuildFile; fileRef = E74D45901ABA7C6300EFE12E /* AFHTTPRequestOperationManager.m */; }; | 35 | E74D45B31ABA7C6300EFE12E /* AFHTTPRequestOperationManager.m in Sources */ = {isa = PBXBuildFile; fileRef = E74D45901ABA7C6300EFE12E /* AFHTTPRequestOperationManager.m */; }; |
@@ -96,6 +111,21 @@ | @@ -96,6 +111,21 @@ | ||
96 | 194EDC8F1A7F52D100421E6C /* YH_AnalyticsTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = YH_AnalyticsTests.m; sourceTree = "<group>"; }; | 111 | 194EDC8F1A7F52D100421E6C /* YH_AnalyticsTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = YH_AnalyticsTests.m; sourceTree = "<group>"; }; |
97 | 194EDC9A1A7F555800421E6C /* YH_Analytics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YH_Analytics.h; sourceTree = "<group>"; }; | 112 | 194EDC9A1A7F555800421E6C /* YH_Analytics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YH_Analytics.h; sourceTree = "<group>"; }; |
98 | 194EDC9B1A7F555800421E6C /* YH_Analytics.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YH_Analytics.m; sourceTree = "<group>"; }; | 113 | 194EDC9B1A7F555800421E6C /* YH_Analytics.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YH_Analytics.m; sourceTree = "<group>"; }; |
114 | + CA7AC7821ADE06F300F30791 /* YHCrashReporterTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YHCrashReporterTests.m; sourceTree = "<group>"; }; | ||
115 | + CA7AC7841ADE073200F30791 /* NSString+YHAnalyticsTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+YHAnalyticsTests.m"; sourceTree = "<group>"; }; | ||
116 | + CA7AC7861ADE075E00F30791 /* YHNetworkAssistantTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YHNetworkAssistantTests.m; sourceTree = "<group>"; }; | ||
117 | + CA7AC7881ADE078200F30791 /* YHAssemblyAssistantTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YHAssemblyAssistantTests.m; sourceTree = "<group>"; }; | ||
118 | + CA7AC78A1ADE079800F30791 /* YHNetworkUserAgentTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YHNetworkUserAgentTests.m; sourceTree = "<group>"; }; | ||
119 | + CA7AC78E1ADE08CA00F30791 /* YHDeviceTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YHDeviceTests.m; sourceTree = "<group>"; }; | ||
120 | + CA7AC7901ADE08DC00F30791 /* YHErrorTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YHErrorTests.m; sourceTree = "<group>"; }; | ||
121 | + CA7AC7921ADE08F000F30791 /* YHEventTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YHEventTests.m; sourceTree = "<group>"; }; | ||
122 | + CA7AC7941ADE090800F30791 /* YHStatusTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YHStatusTests.m; sourceTree = "<group>"; }; | ||
123 | + CA7AC7961ADE092300F30791 /* YHAnalyItemDataTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YHAnalyItemDataTest.m; sourceTree = "<group>"; }; | ||
124 | + CA7AC7991ADE0BD500F30791 /* YHDataFactoryTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YHDataFactoryTests.m; sourceTree = "<group>"; }; | ||
125 | + CA7AC79B1ADE0C0800F30791 /* YHErrorFactoryTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YHErrorFactoryTests.m; sourceTree = "<group>"; }; | ||
126 | + CA7AC79D1ADE0C3900F30791 /* YHDeviceFactoryTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YHDeviceFactoryTests.m; sourceTree = "<group>"; }; | ||
127 | + CA7AC79F1ADE0C4F00F30791 /* YHEventFactoryTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YHEventFactoryTests.m; sourceTree = "<group>"; }; | ||
128 | + CA7AC7A11ADE0C6600F30791 /* YHStatusFactoryTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YHStatusFactoryTests.m; sourceTree = "<group>"; }; | ||
99 | CABC32791AD7CE40002A4260 /* NSNotificationCenter+OCMAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSNotificationCenter+OCMAdditions.h"; sourceTree = "<group>"; }; | 129 | CABC32791AD7CE40002A4260 /* NSNotificationCenter+OCMAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSNotificationCenter+OCMAdditions.h"; sourceTree = "<group>"; }; |
100 | CABC327A1AD7CE40002A4260 /* OCMArg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMArg.h; sourceTree = "<group>"; }; | 130 | CABC327A1AD7CE40002A4260 /* OCMArg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMArg.h; sourceTree = "<group>"; }; |
101 | CABC327B1AD7CE40002A4260 /* OCMConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMConstraint.h; sourceTree = "<group>"; }; | 131 | CABC327B1AD7CE40002A4260 /* OCMConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMConstraint.h; sourceTree = "<group>"; }; |
@@ -257,7 +287,12 @@ | @@ -257,7 +287,12 @@ | ||
257 | 194EDC8C1A7F52D100421E6C /* YH_AnalyticsTests */ = { | 287 | 194EDC8C1A7F52D100421E6C /* YH_AnalyticsTests */ = { |
258 | isa = PBXGroup; | 288 | isa = PBXGroup; |
259 | children = ( | 289 | children = ( |
290 | + CA7AC7981ADE092D00F30791 /* Factory */, | ||
291 | + CA7AC78D1ADE08AF00F30791 /* ModelTest */, | ||
292 | + CA7AC78C1ADE088D00F30791 /* UtilsTest */, | ||
260 | 194EDC8F1A7F52D100421E6C /* YH_AnalyticsTests.m */, | 293 | 194EDC8F1A7F52D100421E6C /* YH_AnalyticsTests.m */, |
294 | + CA7AC7821ADE06F300F30791 /* YHCrashReporterTests.m */, | ||
295 | + CA7AC7841ADE073200F30791 /* NSString+YHAnalyticsTests.m */, | ||
261 | 194EDC8D1A7F52D100421E6C /* Supporting Files */, | 296 | 194EDC8D1A7F52D100421E6C /* Supporting Files */, |
262 | ); | 297 | ); |
263 | path = YH_AnalyticsTests; | 298 | path = YH_AnalyticsTests; |
@@ -288,6 +323,40 @@ | @@ -288,6 +323,40 @@ | ||
288 | path = YH_Analytics; | 323 | path = YH_Analytics; |
289 | sourceTree = "<group>"; | 324 | sourceTree = "<group>"; |
290 | }; | 325 | }; |
326 | + CA7AC78C1ADE088D00F30791 /* UtilsTest */ = { | ||
327 | + isa = PBXGroup; | ||
328 | + children = ( | ||
329 | + CA7AC7861ADE075E00F30791 /* YHNetworkAssistantTests.m */, | ||
330 | + CA7AC7881ADE078200F30791 /* YHAssemblyAssistantTests.m */, | ||
331 | + CA7AC78A1ADE079800F30791 /* YHNetworkUserAgentTests.m */, | ||
332 | + ); | ||
333 | + name = UtilsTest; | ||
334 | + sourceTree = "<group>"; | ||
335 | + }; | ||
336 | + CA7AC78D1ADE08AF00F30791 /* ModelTest */ = { | ||
337 | + isa = PBXGroup; | ||
338 | + children = ( | ||
339 | + CA7AC78E1ADE08CA00F30791 /* YHDeviceTests.m */, | ||
340 | + CA7AC7901ADE08DC00F30791 /* YHErrorTests.m */, | ||
341 | + CA7AC7921ADE08F000F30791 /* YHEventTests.m */, | ||
342 | + CA7AC7941ADE090800F30791 /* YHStatusTests.m */, | ||
343 | + CA7AC7961ADE092300F30791 /* YHAnalyItemDataTest.m */, | ||
344 | + ); | ||
345 | + name = ModelTest; | ||
346 | + sourceTree = "<group>"; | ||
347 | + }; | ||
348 | + CA7AC7981ADE092D00F30791 /* Factory */ = { | ||
349 | + isa = PBXGroup; | ||
350 | + children = ( | ||
351 | + CA7AC7991ADE0BD500F30791 /* YHDataFactoryTests.m */, | ||
352 | + CA7AC79B1ADE0C0800F30791 /* YHErrorFactoryTests.m */, | ||
353 | + CA7AC79D1ADE0C3900F30791 /* YHDeviceFactoryTests.m */, | ||
354 | + CA7AC79F1ADE0C4F00F30791 /* YHEventFactoryTests.m */, | ||
355 | + CA7AC7A11ADE0C6600F30791 /* YHStatusFactoryTests.m */, | ||
356 | + ); | ||
357 | + name = Factory; | ||
358 | + sourceTree = "<group>"; | ||
359 | + }; | ||
291 | CABC32771AD7CDFD002A4260 /* TestDependence */ = { | 360 | CABC32771AD7CDFD002A4260 /* TestDependence */ = { |
292 | isa = PBXGroup; | 361 | isa = PBXGroup; |
293 | children = ( | 362 | children = ( |
@@ -608,7 +677,22 @@ | @@ -608,7 +677,22 @@ | ||
608 | isa = PBXSourcesBuildPhase; | 677 | isa = PBXSourcesBuildPhase; |
609 | buildActionMask = 2147483647; | 678 | buildActionMask = 2147483647; |
610 | files = ( | 679 | files = ( |
680 | + CA7AC7871ADE075E00F30791 /* YHNetworkAssistantTests.m in Sources */, | ||
681 | + CA7AC7A21ADE0C6600F30791 /* YHStatusFactoryTests.m in Sources */, | ||
611 | 194EDC901A7F52D100421E6C /* YH_AnalyticsTests.m in Sources */, | 682 | 194EDC901A7F52D100421E6C /* YH_AnalyticsTests.m in Sources */, |
683 | + CA7AC7951ADE090800F30791 /* YHStatusTests.m in Sources */, | ||
684 | + CA7AC78B1ADE079800F30791 /* YHNetworkUserAgentTests.m in Sources */, | ||
685 | + CA7AC7831ADE06F300F30791 /* YHCrashReporterTests.m in Sources */, | ||
686 | + CA7AC78F1ADE08CA00F30791 /* YHDeviceTests.m in Sources */, | ||
687 | + CA7AC7891ADE078200F30791 /* YHAssemblyAssistantTests.m in Sources */, | ||
688 | + CA7AC7931ADE08F000F30791 /* YHEventTests.m in Sources */, | ||
689 | + CA7AC7851ADE073200F30791 /* NSString+YHAnalyticsTests.m in Sources */, | ||
690 | + CA7AC79E1ADE0C3900F30791 /* YHDeviceFactoryTests.m in Sources */, | ||
691 | + CA7AC79A1ADE0BD500F30791 /* YHDataFactoryTests.m in Sources */, | ||
692 | + CA7AC79C1ADE0C0800F30791 /* YHErrorFactoryTests.m in Sources */, | ||
693 | + CA7AC7A01ADE0C4F00F30791 /* YHEventFactoryTests.m in Sources */, | ||
694 | + CA7AC7911ADE08DC00F30791 /* YHErrorTests.m in Sources */, | ||
695 | + CA7AC7971ADE092300F30791 /* YHAnalyItemDataTest.m in Sources */, | ||
612 | ); | 696 | ); |
613 | runOnlyForDeploymentPostprocessing = 0; | 697 | runOnlyForDeploymentPostprocessing = 0; |
614 | }; | 698 | }; |
1 | +// | ||
2 | +// NSString+YHAnalyticsTests.m | ||
3 | +// YH_Analytics | ||
4 | +// | ||
5 | +// Created by Zhou Rongjun on 15/4/15. | ||
6 | +// Copyright (c) 2015年 YOHO. All rights reserved. | ||
7 | +// | ||
8 | + | ||
9 | +#import <UIKit/UIKit.h> | ||
10 | +#import <XCTest/XCTest.h> | ||
11 | +#import "OCMock.h" | ||
12 | +#import "NSString+YHAnalytics.h" | ||
13 | + | ||
14 | +@interface NSString_YHAnalyticsTests : XCTestCase | ||
15 | + | ||
16 | +@end | ||
17 | + | ||
18 | +@implementation NSString_YHAnalyticsTests | ||
19 | + | ||
20 | +- (void)setUp { | ||
21 | + [super setUp]; | ||
22 | + // Put setup code here. This method is called before the invocation of each test method in the class. | ||
23 | +} | ||
24 | + | ||
25 | +- (void)tearDown { | ||
26 | + // Put teardown code here. This method is called after the invocation of each test method in the class. | ||
27 | + [super tearDown]; | ||
28 | +} | ||
29 | + | ||
30 | +- (void)testExample { | ||
31 | + // This is an example of a functional test case. | ||
32 | + XCTAssert(YES, @"Pass"); | ||
33 | +} | ||
34 | + | ||
35 | +@end |
1 | +// | ||
2 | +// YHAnalyItemDataTest.m | ||
3 | +// YH_Analytics | ||
4 | +// | ||
5 | +// Created by Zhou Rongjun on 15/4/15. | ||
6 | +// Copyright (c) 2015年 YOHO. All rights reserved. | ||
7 | +// | ||
8 | + | ||
9 | +#import <UIKit/UIKit.h> | ||
10 | +#import <XCTest/XCTest.h> | ||
11 | +#import "OCMock.h" | ||
12 | +#import "YHAnalyItemData.h" | ||
13 | + | ||
14 | +@interface YHAnalyItemDataTest : XCTestCase | ||
15 | + | ||
16 | +@end | ||
17 | + | ||
18 | +@implementation YHAnalyItemDataTest | ||
19 | + | ||
20 | +- (void)setUp { | ||
21 | + [super setUp]; | ||
22 | + // Put setup code here. This method is called before the invocation of each test method in the class. | ||
23 | +} | ||
24 | + | ||
25 | +- (void)tearDown { | ||
26 | + // Put teardown code here. This method is called after the invocation of each test method in the class. | ||
27 | + [super tearDown]; | ||
28 | +} | ||
29 | + | ||
30 | +- (void)testExample { | ||
31 | + // This is an example of a functional test case. | ||
32 | + XCTAssert(YES, @"Pass"); | ||
33 | +} | ||
34 | + | ||
35 | +@end |
1 | +// | ||
2 | +// YHAssemblyAssistantTests.m | ||
3 | +// YH_Analytics | ||
4 | +// | ||
5 | +// Created by Zhou Rongjun on 15/4/15. | ||
6 | +// Copyright (c) 2015年 YOHO. All rights reserved. | ||
7 | +// | ||
8 | + | ||
9 | +#import <UIKit/UIKit.h> | ||
10 | +#import <XCTest/XCTest.h> | ||
11 | +#import "OCMock.h" | ||
12 | +#import "YHAssemblyAssistant.h" | ||
13 | + | ||
14 | +@interface YHAssemblyAssistantTests : XCTestCase | ||
15 | + | ||
16 | +@end | ||
17 | + | ||
18 | +@implementation YHAssemblyAssistantTests | ||
19 | + | ||
20 | +- (void)setUp { | ||
21 | + [super setUp]; | ||
22 | + // Put setup code here. This method is called before the invocation of each test method in the class. | ||
23 | +} | ||
24 | + | ||
25 | +- (void)tearDown { | ||
26 | + // Put teardown code here. This method is called after the invocation of each test method in the class. | ||
27 | + [super tearDown]; | ||
28 | +} | ||
29 | + | ||
30 | +- (void)testExample { | ||
31 | + // This is an example of a functional test case. | ||
32 | + XCTAssert(YES, @"Pass"); | ||
33 | +} | ||
34 | + | ||
35 | +@end |
1 | +// | ||
2 | +// YHCrashReporterTests.m | ||
3 | +// YH_Analytics | ||
4 | +// | ||
5 | +// Created by Zhou Rongjun on 15/4/15. | ||
6 | +// Copyright (c) 2015年 YOHO. All rights reserved. | ||
7 | +// | ||
8 | + | ||
9 | +#import <UIKit/UIKit.h> | ||
10 | +#import <XCTest/XCTest.h> | ||
11 | +#import "OCMock.h" | ||
12 | +#import "YHCrashReporter.h" | ||
13 | + | ||
14 | +@interface YHCrashReporterTests : XCTestCase | ||
15 | + | ||
16 | +@end | ||
17 | + | ||
18 | +@implementation YHCrashReporterTests | ||
19 | + | ||
20 | +- (void)setUp { | ||
21 | + [super setUp]; | ||
22 | + // Put setup code here. This method is called before the invocation of each test method in the class. | ||
23 | +} | ||
24 | + | ||
25 | +- (void)tearDown { | ||
26 | + // Put teardown code here. This method is called after the invocation of each test method in the class. | ||
27 | + [super tearDown]; | ||
28 | +} | ||
29 | + | ||
30 | +- (void)testExample { | ||
31 | + // This is an example of a functional test case. | ||
32 | + XCTAssert(YES, @"Pass"); | ||
33 | +} | ||
34 | + | ||
35 | +@end |
1 | +// | ||
2 | +// YHDataFactoryTests.m | ||
3 | +// YH_Analytics | ||
4 | +// | ||
5 | +// Created by Zhou Rongjun on 15/4/15. | ||
6 | +// Copyright (c) 2015年 YOHO. All rights reserved. | ||
7 | +// | ||
8 | + | ||
9 | +#import <UIKit/UIKit.h> | ||
10 | +#import <XCTest/XCTest.h> | ||
11 | +#import "OCMock.h" | ||
12 | +#import "YHDataFactory.h" | ||
13 | + | ||
14 | +@interface YHDataFactoryTests : XCTestCase | ||
15 | + | ||
16 | +@end | ||
17 | + | ||
18 | +@implementation YHDataFactoryTests | ||
19 | + | ||
20 | +- (void)setUp { | ||
21 | + [super setUp]; | ||
22 | + // Put setup code here. This method is called before the invocation of each test method in the class. | ||
23 | +} | ||
24 | + | ||
25 | +- (void)tearDown { | ||
26 | + // Put teardown code here. This method is called after the invocation of each test method in the class. | ||
27 | + [super tearDown]; | ||
28 | +} | ||
29 | + | ||
30 | +- (void)testExample { | ||
31 | + // This is an example of a functional test case. | ||
32 | + XCTAssert(YES, @"Pass"); | ||
33 | +} | ||
34 | + | ||
35 | +@end |
1 | +// | ||
2 | +// YHDeviceFactoryTests.m | ||
3 | +// YH_Analytics | ||
4 | +// | ||
5 | +// Created by Zhou Rongjun on 15/4/15. | ||
6 | +// Copyright (c) 2015年 YOHO. All rights reserved. | ||
7 | +// | ||
8 | + | ||
9 | +#import <UIKit/UIKit.h> | ||
10 | +#import <XCTest/XCTest.h> | ||
11 | +#import "OCMock.h" | ||
12 | +#import "YHDeviceFactory.h" | ||
13 | + | ||
14 | +@interface YHDeviceFactoryTests : XCTestCase | ||
15 | + | ||
16 | +@end | ||
17 | + | ||
18 | +@implementation YHDeviceFactoryTests | ||
19 | + | ||
20 | +- (void)setUp { | ||
21 | + [super setUp]; | ||
22 | + // Put setup code here. This method is called before the invocation of each test method in the class. | ||
23 | +} | ||
24 | + | ||
25 | +- (void)tearDown { | ||
26 | + // Put teardown code here. This method is called after the invocation of each test method in the class. | ||
27 | + [super tearDown]; | ||
28 | +} | ||
29 | + | ||
30 | +- (void)testExample { | ||
31 | + // This is an example of a functional test case. | ||
32 | + XCTAssert(YES, @"Pass"); | ||
33 | +} | ||
34 | + | ||
35 | +@end |
1 | +// | ||
2 | +// YHDeviceTests.m | ||
3 | +// YH_Analytics | ||
4 | +// | ||
5 | +// Created by Zhou Rongjun on 15/4/15. | ||
6 | +// Copyright (c) 2015年 YOHO. All rights reserved. | ||
7 | +// | ||
8 | + | ||
9 | +#import <UIKit/UIKit.h> | ||
10 | +#import <XCTest/XCTest.h> | ||
11 | +#import "OCMock.h" | ||
12 | +#import "YHDevice.h" | ||
13 | + | ||
14 | +@interface YHDeviceTests : XCTestCase | ||
15 | + | ||
16 | +@end | ||
17 | + | ||
18 | +@implementation YHDeviceTests | ||
19 | + | ||
20 | +- (void)setUp { | ||
21 | + [super setUp]; | ||
22 | + // Put setup code here. This method is called before the invocation of each test method in the class. | ||
23 | +} | ||
24 | + | ||
25 | +- (void)tearDown { | ||
26 | + // Put teardown code here. This method is called after the invocation of each test method in the class. | ||
27 | + [super tearDown]; | ||
28 | +} | ||
29 | + | ||
30 | +- (void)testExample { | ||
31 | + // This is an example of a functional test case. | ||
32 | + XCTAssert(YES, @"Pass"); | ||
33 | +} | ||
34 | + | ||
35 | +@end |
1 | +// | ||
2 | +// YHErrorFactoryTests.m | ||
3 | +// YH_Analytics | ||
4 | +// | ||
5 | +// Created by Zhou Rongjun on 15/4/15. | ||
6 | +// Copyright (c) 2015年 YOHO. All rights reserved. | ||
7 | +// | ||
8 | + | ||
9 | +#import <UIKit/UIKit.h> | ||
10 | +#import <XCTest/XCTest.h> | ||
11 | +#import "OCMock.h" | ||
12 | +#import "YHErrorFactory.h" | ||
13 | + | ||
14 | +@interface YHErrorFactoryTests : XCTestCase | ||
15 | + | ||
16 | +@end | ||
17 | + | ||
18 | +@implementation YHErrorFactoryTests | ||
19 | + | ||
20 | +- (void)setUp { | ||
21 | + [super setUp]; | ||
22 | + // Put setup code here. This method is called before the invocation of each test method in the class. | ||
23 | +} | ||
24 | + | ||
25 | +- (void)tearDown { | ||
26 | + // Put teardown code here. This method is called after the invocation of each test method in the class. | ||
27 | + [super tearDown]; | ||
28 | +} | ||
29 | + | ||
30 | +- (void)testExample { | ||
31 | + // This is an example of a functional test case. | ||
32 | + XCTAssert(YES, @"Pass"); | ||
33 | +} | ||
34 | + | ||
35 | +@end |
1 | +// | ||
2 | +// YHErrorTests.m | ||
3 | +// YH_Analytics | ||
4 | +// | ||
5 | +// Created by Zhou Rongjun on 15/4/15. | ||
6 | +// Copyright (c) 2015年 YOHO. All rights reserved. | ||
7 | +// | ||
8 | + | ||
9 | +#import <UIKit/UIKit.h> | ||
10 | +#import <XCTest/XCTest.h> | ||
11 | +#import "OCMock.h" | ||
12 | +#import "YHError.h" | ||
13 | + | ||
14 | +@interface YHErrorTests : XCTestCase | ||
15 | + | ||
16 | +@end | ||
17 | + | ||
18 | +@implementation YHErrorTests | ||
19 | + | ||
20 | +- (void)setUp { | ||
21 | + [super setUp]; | ||
22 | + // Put setup code here. This method is called before the invocation of each test method in the class. | ||
23 | +} | ||
24 | + | ||
25 | +- (void)tearDown { | ||
26 | + // Put teardown code here. This method is called after the invocation of each test method in the class. | ||
27 | + [super tearDown]; | ||
28 | +} | ||
29 | + | ||
30 | +- (void)testExample { | ||
31 | + // This is an example of a functional test case. | ||
32 | + XCTAssert(YES, @"Pass"); | ||
33 | +} | ||
34 | + | ||
35 | +@end |
1 | +// | ||
2 | +// YHEventFactoryTests.m | ||
3 | +// YH_Analytics | ||
4 | +// | ||
5 | +// Created by Zhou Rongjun on 15/4/15. | ||
6 | +// Copyright (c) 2015年 YOHO. All rights reserved. | ||
7 | +// | ||
8 | + | ||
9 | +#import <UIKit/UIKit.h> | ||
10 | +#import <XCTest/XCTest.h> | ||
11 | +#import "OCMock.h" | ||
12 | +#import "YHEventFactory.h" | ||
13 | + | ||
14 | +@interface YHEventFactoryTests : XCTestCase | ||
15 | + | ||
16 | +@end | ||
17 | + | ||
18 | +@implementation YHEventFactoryTests | ||
19 | + | ||
20 | +- (void)setUp { | ||
21 | + [super setUp]; | ||
22 | + // Put setup code here. This method is called before the invocation of each test method in the class. | ||
23 | +} | ||
24 | + | ||
25 | +- (void)tearDown { | ||
26 | + // Put teardown code here. This method is called after the invocation of each test method in the class. | ||
27 | + [super tearDown]; | ||
28 | +} | ||
29 | + | ||
30 | +- (void)testExample { | ||
31 | + // This is an example of a functional test case. | ||
32 | + XCTAssert(YES, @"Pass"); | ||
33 | +} | ||
34 | + | ||
35 | +@end |
1 | +// | ||
2 | +// YHEventTests.m | ||
3 | +// YH_Analytics | ||
4 | +// | ||
5 | +// Created by Zhou Rongjun on 15/4/15. | ||
6 | +// Copyright (c) 2015年 YOHO. All rights reserved. | ||
7 | +// | ||
8 | + | ||
9 | +#import <UIKit/UIKit.h> | ||
10 | +#import <XCTest/XCTest.h> | ||
11 | +#import "OCMock.h" | ||
12 | +#import "YHEvent.h" | ||
13 | + | ||
14 | +@interface YHEventTests : XCTestCase | ||
15 | + | ||
16 | +@end | ||
17 | + | ||
18 | +@implementation YHEventTests | ||
19 | + | ||
20 | +- (void)setUp { | ||
21 | + [super setUp]; | ||
22 | + // Put setup code here. This method is called before the invocation of each test method in the class. | ||
23 | +} | ||
24 | + | ||
25 | +- (void)tearDown { | ||
26 | + // Put teardown code here. This method is called after the invocation of each test method in the class. | ||
27 | + [super tearDown]; | ||
28 | +} | ||
29 | + | ||
30 | +- (void)testExample { | ||
31 | + // This is an example of a functional test case. | ||
32 | + XCTAssert(YES, @"Pass"); | ||
33 | +} | ||
34 | + | ||
35 | +@end |
1 | +// | ||
2 | +// YHNetworkAssistantTests.m | ||
3 | +// YH_Analytics | ||
4 | +// | ||
5 | +// Created by Zhou Rongjun on 15/4/15. | ||
6 | +// Copyright (c) 2015年 YOHO. All rights reserved. | ||
7 | +// | ||
8 | + | ||
9 | +#import <UIKit/UIKit.h> | ||
10 | +#import <XCTest/XCTest.h> | ||
11 | +#import "OCMock.h" | ||
12 | +#import "YHNetworkAssistant.h" | ||
13 | + | ||
14 | +@interface YHNetworkAssistantTests : XCTestCase | ||
15 | + | ||
16 | +@end | ||
17 | + | ||
18 | +@implementation YHNetworkAssistantTests | ||
19 | + | ||
20 | +- (void)setUp { | ||
21 | + [super setUp]; | ||
22 | + // Put setup code here. This method is called before the invocation of each test method in the class. | ||
23 | +} | ||
24 | + | ||
25 | +- (void)tearDown { | ||
26 | + // Put teardown code here. This method is called after the invocation of each test method in the class. | ||
27 | + [super tearDown]; | ||
28 | +} | ||
29 | + | ||
30 | +- (void)testExample { | ||
31 | + // This is an example of a functional test case. | ||
32 | + XCTAssert(YES, @"Pass"); | ||
33 | +} | ||
34 | + | ||
35 | +@end |
1 | +// | ||
2 | +// YHNetworkUserAgentTests.m | ||
3 | +// YH_Analytics | ||
4 | +// | ||
5 | +// Created by Zhou Rongjun on 15/4/15. | ||
6 | +// Copyright (c) 2015年 YOHO. All rights reserved. | ||
7 | +// | ||
8 | + | ||
9 | +#import <UIKit/UIKit.h> | ||
10 | +#import <XCTest/XCTest.h> | ||
11 | +#import "OCMock.h" | ||
12 | +#import "YHNetworkUserAgent.h" | ||
13 | + | ||
14 | +@interface YHNetworkUserAgentTests : XCTestCase | ||
15 | + | ||
16 | +@end | ||
17 | + | ||
18 | +@implementation YHNetworkUserAgentTests | ||
19 | + | ||
20 | +- (void)setUp { | ||
21 | + [super setUp]; | ||
22 | + // Put setup code here. This method is called before the invocation of each test method in the class. | ||
23 | +} | ||
24 | + | ||
25 | +- (void)tearDown { | ||
26 | + // Put teardown code here. This method is called after the invocation of each test method in the class. | ||
27 | + [super tearDown]; | ||
28 | +} | ||
29 | + | ||
30 | +- (void)testExample { | ||
31 | + // This is an example of a functional test case. | ||
32 | + XCTAssert(YES, @"Pass"); | ||
33 | +} | ||
34 | + | ||
35 | +@end |
1 | +// | ||
2 | +// YHStatusFactoryTests.m | ||
3 | +// YH_Analytics | ||
4 | +// | ||
5 | +// Created by Zhou Rongjun on 15/4/15. | ||
6 | +// Copyright (c) 2015年 YOHO. All rights reserved. | ||
7 | +// | ||
8 | + | ||
9 | +#import <UIKit/UIKit.h> | ||
10 | +#import <XCTest/XCTest.h> | ||
11 | +#import "OCMock.h" | ||
12 | +#import "YHStatusFactory.h" | ||
13 | + | ||
14 | +@interface YHStatusFactoryTests : XCTestCase | ||
15 | + | ||
16 | +@end | ||
17 | + | ||
18 | +@implementation YHStatusFactoryTests | ||
19 | + | ||
20 | +- (void)setUp { | ||
21 | + [super setUp]; | ||
22 | + // Put setup code here. This method is called before the invocation of each test method in the class. | ||
23 | +} | ||
24 | + | ||
25 | +- (void)tearDown { | ||
26 | + // Put teardown code here. This method is called after the invocation of each test method in the class. | ||
27 | + [super tearDown]; | ||
28 | +} | ||
29 | + | ||
30 | +- (void)testExample { | ||
31 | + // This is an example of a functional test case. | ||
32 | + XCTAssert(YES, @"Pass"); | ||
33 | +} | ||
34 | + | ||
35 | +@end |
1 | +// | ||
2 | +// YHStatusTests.m | ||
3 | +// YH_Analytics | ||
4 | +// | ||
5 | +// Created by Zhou Rongjun on 15/4/15. | ||
6 | +// Copyright (c) 2015年 YOHO. All rights reserved. | ||
7 | +// | ||
8 | + | ||
9 | +#import <UIKit/UIKit.h> | ||
10 | +#import <XCTest/XCTest.h> | ||
11 | +#import "OCMock.h" | ||
12 | +#import "YHStatus.h" | ||
13 | + | ||
14 | +@interface YHStatusTests : XCTestCase | ||
15 | + | ||
16 | +@end | ||
17 | + | ||
18 | +@implementation YHStatusTests | ||
19 | + | ||
20 | +- (void)setUp { | ||
21 | + [super setUp]; | ||
22 | + // Put setup code here. This method is called before the invocation of each test method in the class. | ||
23 | +} | ||
24 | + | ||
25 | +- (void)tearDown { | ||
26 | + // Put teardown code here. This method is called after the invocation of each test method in the class. | ||
27 | + [super tearDown]; | ||
28 | +} | ||
29 | + | ||
30 | +- (void)testExample { | ||
31 | + // This is an example of a functional test case. | ||
32 | + XCTAssert(YES, @"Pass"); | ||
33 | +} | ||
34 | + | ||
35 | +@end |
-
Please register or login to post a comment