mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-03 21:16:35 +00:00
Test telemetry contract files
This commit is contained in:
parent
e6c0ec2e47
commit
127710f983
@ -113,6 +113,24 @@
|
||||
1B98D45B1B98F6CA00B8000B /* BITReachability.h in Headers */ = {isa = PBXBuildFile; fileRef = 1B98D4571B98F6CA00B8000B /* BITReachability.h */; };
|
||||
1B98D45C1B98F6CA00B8000B /* BITReachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B98D4581B98F6CA00B8000B /* BITReachability.m */; };
|
||||
1B98D45D1B98F6CA00B8000B /* BITReachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B98D4581B98F6CA00B8000B /* BITReachability.m */; };
|
||||
1B98D4831B9A1B6F00B8000B /* BITApplicationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B98D47A1B9A1B6F00B8000B /* BITApplicationTests.m */; };
|
||||
1B98D4841B9A1B6F00B8000B /* BITApplicationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B98D47A1B9A1B6F00B8000B /* BITApplicationTests.m */; };
|
||||
1B98D4851B9A1B6F00B8000B /* BITBaseTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B98D47B1B9A1B6F00B8000B /* BITBaseTests.m */; };
|
||||
1B98D4861B9A1B6F00B8000B /* BITBaseTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B98D47B1B9A1B6F00B8000B /* BITBaseTests.m */; };
|
||||
1B98D4871B9A1B6F00B8000B /* BITDataTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B98D47C1B9A1B6F00B8000B /* BITDataTests.m */; };
|
||||
1B98D4881B9A1B6F00B8000B /* BITDataTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B98D47C1B9A1B6F00B8000B /* BITDataTests.m */; };
|
||||
1B98D4891B9A1B6F00B8000B /* BITDeviceTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B98D47D1B9A1B6F00B8000B /* BITDeviceTests.m */; };
|
||||
1B98D48A1B9A1B6F00B8000B /* BITDeviceTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B98D47D1B9A1B6F00B8000B /* BITDeviceTests.m */; };
|
||||
1B98D48B1B9A1B6F00B8000B /* BITDomainTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B98D47E1B9A1B6F00B8000B /* BITDomainTests.m */; };
|
||||
1B98D48C1B9A1B6F00B8000B /* BITDomainTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B98D47E1B9A1B6F00B8000B /* BITDomainTests.m */; };
|
||||
1B98D48D1B9A1B6F00B8000B /* BITInternalTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B98D47F1B9A1B6F00B8000B /* BITInternalTests.m */; };
|
||||
1B98D48E1B9A1B6F00B8000B /* BITInternalTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B98D47F1B9A1B6F00B8000B /* BITInternalTests.m */; };
|
||||
1B98D48F1B9A1B6F00B8000B /* BITLocationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B98D4801B9A1B6F00B8000B /* BITLocationTests.m */; };
|
||||
1B98D4901B9A1B6F00B8000B /* BITLocationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B98D4801B9A1B6F00B8000B /* BITLocationTests.m */; };
|
||||
1B98D4911B9A1B6F00B8000B /* BITOperationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B98D4811B9A1B6F00B8000B /* BITOperationTests.m */; };
|
||||
1B98D4921B9A1B6F00B8000B /* BITOperationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B98D4811B9A1B6F00B8000B /* BITOperationTests.m */; };
|
||||
1B98D4931B9A1B6F00B8000B /* BITUserTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B98D4821B9A1B6F00B8000B /* BITUserTests.m */; };
|
||||
1B98D4941B9A1B6F00B8000B /* BITUserTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B98D4821B9A1B6F00B8000B /* BITUserTests.m */; };
|
||||
1BD33EAA1B950BC200C3368B /* BITSessionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1BD33EA91B950BC200C3368B /* BITSessionTests.m */; };
|
||||
1BD33EAB1B950BC200C3368B /* BITSessionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1BD33EA91B950BC200C3368B /* BITSessionTests.m */; };
|
||||
1BD33EAF1B950DC700C3368B /* BITChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = 1BD33EAD1B950DC700C3368B /* BITChannel.h */; };
|
||||
@ -512,6 +530,15 @@
|
||||
1B87EFC81B8D30AC0007C96B /* BITOrderedDictionary.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BITOrderedDictionary.m; sourceTree = "<group>"; };
|
||||
1B98D4571B98F6CA00B8000B /* BITReachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BITReachability.h; sourceTree = "<group>"; };
|
||||
1B98D4581B98F6CA00B8000B /* BITReachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BITReachability.m; sourceTree = "<group>"; };
|
||||
1B98D47A1B9A1B6F00B8000B /* BITApplicationTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BITApplicationTests.m; sourceTree = "<group>"; };
|
||||
1B98D47B1B9A1B6F00B8000B /* BITBaseTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BITBaseTests.m; sourceTree = "<group>"; };
|
||||
1B98D47C1B9A1B6F00B8000B /* BITDataTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BITDataTests.m; sourceTree = "<group>"; };
|
||||
1B98D47D1B9A1B6F00B8000B /* BITDeviceTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BITDeviceTests.m; sourceTree = "<group>"; };
|
||||
1B98D47E1B9A1B6F00B8000B /* BITDomainTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BITDomainTests.m; sourceTree = "<group>"; };
|
||||
1B98D47F1B9A1B6F00B8000B /* BITInternalTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BITInternalTests.m; sourceTree = "<group>"; };
|
||||
1B98D4801B9A1B6F00B8000B /* BITLocationTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BITLocationTests.m; sourceTree = "<group>"; };
|
||||
1B98D4811B9A1B6F00B8000B /* BITOperationTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BITOperationTests.m; sourceTree = "<group>"; };
|
||||
1B98D4821B9A1B6F00B8000B /* BITUserTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BITUserTests.m; sourceTree = "<group>"; };
|
||||
1BD33EA91B950BC200C3368B /* BITSessionTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BITSessionTests.m; sourceTree = "<group>"; };
|
||||
1BD33EAD1B950DC700C3368B /* BITChannel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BITChannel.h; sourceTree = "<group>"; };
|
||||
1BD33EAE1B950DC700C3368B /* BITChannel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BITChannel.m; sourceTree = "<group>"; };
|
||||
@ -854,6 +881,22 @@
|
||||
name = "Contract Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1B98D4641B9A183500B8000B /* Contract Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1B98D47A1B9A1B6F00B8000B /* BITApplicationTests.m */,
|
||||
1B98D47B1B9A1B6F00B8000B /* BITBaseTests.m */,
|
||||
1B98D47C1B9A1B6F00B8000B /* BITDataTests.m */,
|
||||
1B98D47D1B9A1B6F00B8000B /* BITDeviceTests.m */,
|
||||
1B98D47E1B9A1B6F00B8000B /* BITDomainTests.m */,
|
||||
1B98D47F1B9A1B6F00B8000B /* BITInternalTests.m */,
|
||||
1B98D4801B9A1B6F00B8000B /* BITLocationTests.m */,
|
||||
1B98D4811B9A1B6F00B8000B /* BITOperationTests.m */,
|
||||
1B98D4821B9A1B6F00B8000B /* BITUserTests.m */,
|
||||
);
|
||||
name = "Contract Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1E5955A415B71BDC00A03429 /* Images */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@ -900,6 +943,7 @@
|
||||
1E5A459616F0DFC200B55C04 /* HockeySDKTests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1B98D4641B9A183500B8000B /* Contract Files */,
|
||||
1EA1170216F53B49001C015C /* Fixtures */,
|
||||
1E5A459716F0DFC200B55C04 /* Supporting Files */,
|
||||
1E5A459D16F0DFC200B55C04 /* BITStoreUpdateManagerTests.m */,
|
||||
@ -1773,17 +1817,26 @@
|
||||
files = (
|
||||
1B460AA41B8E5D910000C344 /* BITTestsDependencyInjection.m in Sources */,
|
||||
1B460AB61B8E72FD0000C344 /* BITTelemetryManagerTests.m in Sources */,
|
||||
1B98D4851B9A1B6F00B8000B /* BITBaseTests.m in Sources */,
|
||||
1E5A459E16F0DFC200B55C04 /* BITStoreUpdateManagerTests.m in Sources */,
|
||||
1E566D071A275C4C0070F514 /* BITCrashReportTextFormatterTests.m in Sources */,
|
||||
1EFF03E517F2485500A5F13C /* BITCrashManagerTests.m in Sources */,
|
||||
E40E0B0917DA19DC005E38C1 /* BITHockeyAppClientTests.m in Sources */,
|
||||
1E70A23617F31B82001BB32D /* BITHockeyHelperTests.m in Sources */,
|
||||
1B98D4871B9A1B6F00B8000B /* BITDataTests.m in Sources */,
|
||||
E48A3DEF17B3EFF100924C3D /* BITAuthenticatorTests.m in Sources */,
|
||||
B274DDB31B966914007F2B9E /* BITPersistenceTests.m in Sources */,
|
||||
1EA1170716F53B91001C015C /* BITTestHelper.m in Sources */,
|
||||
1B98D4911B9A1B6F00B8000B /* BITOperationTests.m in Sources */,
|
||||
1B98D48F1B9A1B6F00B8000B /* BITLocationTests.m in Sources */,
|
||||
1B98D4891B9A1B6F00B8000B /* BITDeviceTests.m in Sources */,
|
||||
1E61CCAF18E0585A00A5E38E /* BITFeedbackManagerTests.m in Sources */,
|
||||
1BD33EAA1B950BC200C3368B /* BITSessionTests.m in Sources */,
|
||||
E4507E4317F0658F00171A0D /* BITKeychainUtilsTests.m in Sources */,
|
||||
1B98D4931B9A1B6F00B8000B /* BITUserTests.m in Sources */,
|
||||
1B98D48B1B9A1B6F00B8000B /* BITDomainTests.m in Sources */,
|
||||
1B98D48D1B9A1B6F00B8000B /* BITInternalTests.m in Sources */,
|
||||
1B98D4831B9A1B6F00B8000B /* BITApplicationTests.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@ -1859,17 +1912,26 @@
|
||||
files = (
|
||||
1B460AA51B8E5D910000C344 /* BITTestsDependencyInjection.m in Sources */,
|
||||
1B460AB71B8E72FD0000C344 /* BITTelemetryManagerTests.m in Sources */,
|
||||
1B98D4861B9A1B6F00B8000B /* BITBaseTests.m in Sources */,
|
||||
1EB617B31B0A31D30035A986 /* BITFeedbackManagerTests.m in Sources */,
|
||||
1EB617B81B0A31DB0035A986 /* BITTestHelper.m in Sources */,
|
||||
1EB617B71B0A31D30035A986 /* BITCrashReportTextFormatterTests.m in Sources */,
|
||||
1EB617B51B0A31D30035A986 /* BITKeychainUtilsTests.m in Sources */,
|
||||
1EB617B01B0A31D30035A986 /* BITStoreUpdateManagerTests.m in Sources */,
|
||||
1B98D4881B9A1B6F00B8000B /* BITDataTests.m in Sources */,
|
||||
1EB617B41B0A31D30035A986 /* BITHockeyAppClientTests.m in Sources */,
|
||||
B274DDB41B96691E007F2B9E /* BITPersistenceTests.m in Sources */,
|
||||
1EB617D71B0A387B0035A986 /* BITAuthenticatorTests.m in Sources */,
|
||||
1B98D4921B9A1B6F00B8000B /* BITOperationTests.m in Sources */,
|
||||
1B98D4901B9A1B6F00B8000B /* BITLocationTests.m in Sources */,
|
||||
1B98D48A1B9A1B6F00B8000B /* BITDeviceTests.m in Sources */,
|
||||
1EB617B61B0A31D30035A986 /* BITHockeyHelperTests.m in Sources */,
|
||||
1BD33EAB1B950BC200C3368B /* BITSessionTests.m in Sources */,
|
||||
1EB617B21B0A31D30035A986 /* BITCrashManagerTests.m in Sources */,
|
||||
1B98D4941B9A1B6F00B8000B /* BITUserTests.m in Sources */,
|
||||
1B98D48C1B9A1B6F00B8000B /* BITDomainTests.m in Sources */,
|
||||
1B98D48E1B9A1B6F00B8000B /* BITInternalTests.m in Sources */,
|
||||
1B98D4841B9A1B6F00B8000B /* BITApplicationTests.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
||||
33
Support/HockeySDKTests/BITApplicationTests.m
Normal file
33
Support/HockeySDKTests/BITApplicationTests.m
Normal file
@ -0,0 +1,33 @@
|
||||
#import <XCTest/XCTest.h>
|
||||
#import "BITApplication.h"
|
||||
|
||||
@interface BITApplicationTests : XCTestCase
|
||||
|
||||
@end
|
||||
|
||||
@implementation BITApplicationTests
|
||||
|
||||
- (void)testverPropertyWorksAsExpected {
|
||||
NSString *expected = @"Test string";
|
||||
BITApplication *item = [BITApplication new];
|
||||
item.version = expected;
|
||||
NSString *actual = item.version;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
|
||||
expected = @"Other string";
|
||||
item.version = expected;
|
||||
actual = item.version;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
}
|
||||
|
||||
- (void)testSerialize {
|
||||
BITApplication *item = [BITApplication new];
|
||||
item.version = @"Test string";
|
||||
item.build = @"Test build";
|
||||
item.typeId = @"Test typeId";
|
||||
NSString *actual = [item serializeToString];
|
||||
NSString *expected = @"{\"ai.application.ver\":\"Test string\",\"ai.application.build\":\"Test build\",\"ai.application.typeId\":\"Test typeId\"}";
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
}
|
||||
|
||||
@end
|
||||
31
Support/HockeySDKTests/BITBaseTests.m
Normal file
31
Support/HockeySDKTests/BITBaseTests.m
Normal file
@ -0,0 +1,31 @@
|
||||
#import <XCTest/XCTest.h>
|
||||
#import "BITBase.h"
|
||||
|
||||
@interface BITBaseTests : XCTestCase
|
||||
|
||||
@end
|
||||
|
||||
@implementation BITBaseTests
|
||||
|
||||
- (void)testbase_typePropertyWorksAsExpected {
|
||||
NSString *expected = @"Test string";
|
||||
BITBase *item = [BITBase new];
|
||||
item.baseType = expected;
|
||||
NSString *actual = item.baseType;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
|
||||
expected = @"Other string";
|
||||
item.baseType = expected;
|
||||
actual = item.baseType;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
}
|
||||
|
||||
- (void)testSerialize {
|
||||
BITBase *item = [BITBase new];
|
||||
item.baseType = @"Test string";
|
||||
NSString *actual = [item serializeToString];
|
||||
NSString *expected = @"{\"baseType\":\"Test string\"}";
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
}
|
||||
|
||||
@end
|
||||
31
Support/HockeySDKTests/BITDataTests.m
Normal file
31
Support/HockeySDKTests/BITDataTests.m
Normal file
@ -0,0 +1,31 @@
|
||||
#import <XCTest/XCTest.h>
|
||||
#import "BITData.h"
|
||||
|
||||
@interface BITDataTests : XCTestCase
|
||||
|
||||
@end
|
||||
|
||||
@implementation BITDataTests
|
||||
|
||||
- (void)testbase_dataPropertyWorksAsExpected {
|
||||
BITTelemetryData *expected = [BITTelemetryData new];
|
||||
BITData *item = [BITData new];
|
||||
item.baseData = expected;
|
||||
BITTelemetryData *actual = item.baseData;
|
||||
XCTAssertTrue(actual == expected);
|
||||
|
||||
expected = [BITTelemetryData new];
|
||||
item.baseData = expected;
|
||||
actual = item.baseData;
|
||||
XCTAssertTrue(actual == expected);
|
||||
}
|
||||
|
||||
- (void)testSerialize {
|
||||
BITData *item = [BITData new];
|
||||
item.baseData = [BITTelemetryData new];
|
||||
NSString *actual = [item serializeToString];
|
||||
NSString *expected = @"{\"baseData\":{}}";
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
}
|
||||
|
||||
@end
|
||||
215
Support/HockeySDKTests/BITDeviceTests.m
Normal file
215
Support/HockeySDKTests/BITDeviceTests.m
Normal file
@ -0,0 +1,215 @@
|
||||
#import <XCTest/XCTest.h>
|
||||
#import "BITDevice.h"
|
||||
|
||||
@interface BITDeviceTests : XCTestCase
|
||||
|
||||
@end
|
||||
|
||||
@implementation BITDeviceTests
|
||||
|
||||
- (void)testidPropertyWorksAsExpected {
|
||||
NSString *expected = @"Test string";
|
||||
BITDevice *item = [BITDevice new];
|
||||
item.deviceId = expected;
|
||||
NSString *actual = item.deviceId;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
|
||||
expected = @"Other string";
|
||||
item.deviceId = expected;
|
||||
actual = item.deviceId;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
}
|
||||
|
||||
- (void)testipPropertyWorksAsExpected {
|
||||
NSString *expected = @"Test string";
|
||||
BITDevice *item = [BITDevice new];
|
||||
item.ip = expected;
|
||||
NSString *actual = item.ip;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
|
||||
expected = @"Other string";
|
||||
item.ip = expected;
|
||||
actual = item.ip;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
}
|
||||
|
||||
- (void)testlanguagePropertyWorksAsExpected {
|
||||
NSString *expected = @"Test string";
|
||||
BITDevice *item = [BITDevice new];
|
||||
item.language = expected;
|
||||
NSString *actual = item.language;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
|
||||
expected = @"Other string";
|
||||
item.language = expected;
|
||||
actual = item.language;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
}
|
||||
|
||||
- (void)testlocalePropertyWorksAsExpected {
|
||||
NSString *expected = @"Test string";
|
||||
BITDevice *item = [BITDevice new];
|
||||
item.locale = expected;
|
||||
NSString *actual = item.locale;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
|
||||
expected = @"Other string";
|
||||
item.locale = expected;
|
||||
actual = item.locale;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
}
|
||||
|
||||
- (void)testmodelPropertyWorksAsExpected {
|
||||
NSString *expected = @"Test string";
|
||||
BITDevice *item = [BITDevice new];
|
||||
item.model = expected;
|
||||
NSString *actual = item.model;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
|
||||
expected = @"Other string";
|
||||
item.model = expected;
|
||||
actual = item.model;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
}
|
||||
|
||||
- (void)testnetworkPropertyWorksAsExpected {
|
||||
NSString *expected = @"Test string";
|
||||
BITDevice *item = [BITDevice new];
|
||||
item.network = expected;
|
||||
NSString *actual = item.network;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
|
||||
expected = @"Other string";
|
||||
item.network = expected;
|
||||
actual = item.network;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
}
|
||||
|
||||
- (void)testoem_namePropertyWorksAsExpected {
|
||||
NSString *expected = @"Test string";
|
||||
BITDevice *item = [BITDevice new];
|
||||
item.oemName = expected;
|
||||
NSString *actual = item.oemName;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
|
||||
expected = @"Other string";
|
||||
item.oemName = expected;
|
||||
actual = item.oemName;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
}
|
||||
|
||||
- (void)testosPropertyWorksAsExpected {
|
||||
NSString *expected = @"Test string";
|
||||
BITDevice *item = [BITDevice new];
|
||||
item.os = expected;
|
||||
NSString *actual = item.os;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
|
||||
expected = @"Other string";
|
||||
item.os = expected;
|
||||
actual = item.os;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
}
|
||||
|
||||
- (void)testos_versionPropertyWorksAsExpected {
|
||||
NSString *expected = @"Test string";
|
||||
BITDevice *item = [BITDevice new];
|
||||
item.osVersion = expected;
|
||||
NSString *actual = item.osVersion;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
|
||||
expected = @"Other string";
|
||||
item.osVersion = expected;
|
||||
actual = item.osVersion;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
}
|
||||
|
||||
- (void)testrole_instancePropertyWorksAsExpected {
|
||||
NSString *expected = @"Test string";
|
||||
BITDevice *item = [BITDevice new];
|
||||
item.roleInstance = expected;
|
||||
NSString *actual = item.roleInstance;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
|
||||
expected = @"Other string";
|
||||
item.roleInstance = expected;
|
||||
actual = item.roleInstance;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
}
|
||||
|
||||
- (void)testrole_namePropertyWorksAsExpected {
|
||||
NSString *expected = @"Test string";
|
||||
BITDevice *item = [BITDevice new];
|
||||
item.roleName = expected;
|
||||
NSString *actual = item.roleName;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
|
||||
expected = @"Other string";
|
||||
item.roleName = expected;
|
||||
actual = item.roleName;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
}
|
||||
|
||||
- (void)testscreen_resolutionPropertyWorksAsExpected {
|
||||
NSString *expected = @"Test string";
|
||||
BITDevice *item = [BITDevice new];
|
||||
item.screenResolution = expected;
|
||||
NSString *actual = item.screenResolution;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
|
||||
expected = @"Other string";
|
||||
item.screenResolution = expected;
|
||||
actual = item.screenResolution;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
}
|
||||
|
||||
- (void)testtypePropertyWorksAsExpected {
|
||||
NSString *expected = @"Test string";
|
||||
BITDevice *item = [BITDevice new];
|
||||
item.type = expected;
|
||||
NSString *actual = item.type;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
|
||||
expected = @"Other string";
|
||||
item.type = expected;
|
||||
actual = item.type;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
}
|
||||
|
||||
- (void)testvm_namePropertyWorksAsExpected {
|
||||
NSString *expected = @"Test string";
|
||||
BITDevice *item = [BITDevice new];
|
||||
item.machineName = expected;
|
||||
NSString *actual = item.machineName;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
|
||||
expected = @"Other string";
|
||||
item.machineName = expected;
|
||||
actual = item.machineName;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
}
|
||||
|
||||
- (void)testSerialize {
|
||||
BITDevice *item = [BITDevice new];
|
||||
item.deviceId = @"Test string";
|
||||
item.ip = @"Test string";
|
||||
item.language = @"Test string";
|
||||
item.locale = @"Test string";
|
||||
item.model = @"Test string";
|
||||
item.network = @"Test string";
|
||||
item.networkName = @"Test networkName";
|
||||
item.oemName = @"Test string";
|
||||
item.os = @"Test string";
|
||||
item.osVersion = @"Test string";
|
||||
item.roleInstance = @"Test string";
|
||||
item.roleName = @"Test string";
|
||||
item.screenResolution = @"Test string";
|
||||
item.type = @"Test string";
|
||||
item.machineName = @"Test string";
|
||||
item.vmName = @"Test vmName";
|
||||
NSString *actual = [item serializeToString];
|
||||
NSString *expected = @"{\"ai.device.id\":\"Test string\",\"ai.device.ip\":\"Test string\",\"ai.device.language\":\"Test string\",\"ai.device.locale\":\"Test string\",\"ai.device.model\":\"Test string\",\"ai.device.network\":\"Test string\",\"ai.device.networkName\":\"Test networkName\",\"ai.device.oemName\":\"Test string\",\"ai.device.os\":\"Test string\",\"ai.device.osVersion\":\"Test string\",\"ai.device.roleInstance\":\"Test string\",\"ai.device.roleName\":\"Test string\",\"ai.device.screenResolution\":\"Test string\",\"ai.device.type\":\"Test string\",\"ai.device.machineName\":\"Test string\",\"ai.device.vmName\":\"Test vmName\"}";
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
}
|
||||
|
||||
@end
|
||||
17
Support/HockeySDKTests/BITDomainTests.m
Normal file
17
Support/HockeySDKTests/BITDomainTests.m
Normal file
@ -0,0 +1,17 @@
|
||||
#import <XCTest/XCTest.h>
|
||||
#import "BITDomain.h"
|
||||
|
||||
@interface BITDomainTests : XCTestCase
|
||||
|
||||
@end
|
||||
|
||||
@implementation BITDomainTests
|
||||
|
||||
- (void)testSerialize {
|
||||
BITDomain *item = [BITDomain new];
|
||||
NSString *actual = [item serializeToString];
|
||||
NSString *expected = @"{}";
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
}
|
||||
|
||||
@end
|
||||
45
Support/HockeySDKTests/BITInternalTests.m
Normal file
45
Support/HockeySDKTests/BITInternalTests.m
Normal file
@ -0,0 +1,45 @@
|
||||
#import <XCTest/XCTest.h>
|
||||
#import "BITInternal.h"
|
||||
|
||||
@interface BITInternalTests : XCTestCase
|
||||
|
||||
@end
|
||||
|
||||
@implementation BITInternalTests
|
||||
|
||||
- (void)testsdk_versionPropertyWorksAsExpected {
|
||||
NSString *expected = @"Test string";
|
||||
BITInternal *item = [BITInternal new];
|
||||
item.sdkVersion = expected;
|
||||
NSString *actual = item.sdkVersion;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
|
||||
expected = @"Other string";
|
||||
item.sdkVersion = expected;
|
||||
actual = item.sdkVersion;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
}
|
||||
|
||||
- (void)testagent_versionPropertyWorksAsExpected {
|
||||
NSString *expected = @"Test string";
|
||||
BITInternal *item = [BITInternal new];
|
||||
item.agentVersion = expected;
|
||||
NSString *actual = item.agentVersion;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
|
||||
expected = @"Other string";
|
||||
item.agentVersion = expected;
|
||||
actual = item.agentVersion;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
}
|
||||
|
||||
- (void)testSerialize {
|
||||
BITInternal *item = [BITInternal new];
|
||||
item.sdkVersion = @"Test string";
|
||||
item.agentVersion = @"Test string";
|
||||
NSString *actual = [item serializeToString];
|
||||
NSString *expected = @"{\"ai.internal.sdkVersion\":\"Test string\",\"ai.internal.agentVersion\":\"Test string\"}";
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
}
|
||||
|
||||
@end
|
||||
31
Support/HockeySDKTests/BITLocationTests.m
Normal file
31
Support/HockeySDKTests/BITLocationTests.m
Normal file
@ -0,0 +1,31 @@
|
||||
#import <XCTest/XCTest.h>
|
||||
#import "BITLocation.h"
|
||||
|
||||
@interface BITLocationTests : XCTestCase
|
||||
|
||||
@end
|
||||
|
||||
@implementation BITLocationTests
|
||||
|
||||
- (void)testipPropertyWorksAsExpected {
|
||||
NSString *expected = @"Test string";
|
||||
BITLocation *item = [BITLocation new];
|
||||
item.ip = expected;
|
||||
NSString *actual = item.ip;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
|
||||
expected = @"Other string";
|
||||
item.ip = expected;
|
||||
actual = item.ip;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
}
|
||||
|
||||
- (void)testSerialize {
|
||||
BITLocation *item = [BITLocation new];
|
||||
item.ip = @"Test string";
|
||||
NSString *actual = [item serializeToString];
|
||||
NSString *expected = @"{\"ai.location.ip\":\"Test string\"}";
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
}
|
||||
|
||||
@end
|
||||
75
Support/HockeySDKTests/BITOperationTests.m
Normal file
75
Support/HockeySDKTests/BITOperationTests.m
Normal file
@ -0,0 +1,75 @@
|
||||
#import <XCTest/XCTest.h>
|
||||
#import "BITOperation.h"
|
||||
|
||||
@interface BITOperationTests : XCTestCase
|
||||
|
||||
@end
|
||||
|
||||
@implementation BITOperationTests
|
||||
|
||||
- (void)testidPropertyWorksAsExpected {
|
||||
NSString *expected = @"Test string";
|
||||
BITOperation *item = [BITOperation new];
|
||||
item.operationId = expected;
|
||||
NSString *actual = item.operationId;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
|
||||
expected = @"Other string";
|
||||
item.operationId = expected;
|
||||
actual = item.operationId;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
}
|
||||
|
||||
- (void)testnamePropertyWorksAsExpected {
|
||||
NSString *expected = @"Test string";
|
||||
BITOperation *item = [BITOperation new];
|
||||
item.name = expected;
|
||||
NSString *actual = item.name;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
|
||||
expected = @"Other string";
|
||||
item.name = expected;
|
||||
actual = item.name;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
}
|
||||
|
||||
- (void)testparent_idPropertyWorksAsExpected {
|
||||
NSString *expected = @"Test string";
|
||||
BITOperation *item = [BITOperation new];
|
||||
item.parentId = expected;
|
||||
NSString *actual = item.parentId;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
|
||||
expected = @"Other string";
|
||||
item.parentId = expected;
|
||||
actual = item.parentId;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
}
|
||||
|
||||
- (void)testroot_idPropertyWorksAsExpected {
|
||||
NSString *expected = @"Test string";
|
||||
BITOperation *item = [BITOperation new];
|
||||
item.rootId = expected;
|
||||
NSString *actual = item.rootId;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
|
||||
expected = @"Other string";
|
||||
item.rootId = expected;
|
||||
actual = item.rootId;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
}
|
||||
|
||||
- (void)testSerialize {
|
||||
BITOperation *item = [BITOperation new];
|
||||
item.operationId = @"Test string";
|
||||
item.name = @"Test string";
|
||||
item.parentId = @"Test string";
|
||||
item.rootId = @"Test string";
|
||||
item.syntheticSource = @"Test source";
|
||||
item.isSynthetic = @"false";
|
||||
NSString *actual = [item serializeToString];
|
||||
NSString *expected = @"{\"ai.operation.id\":\"Test string\",\"ai.operation.name\":\"Test string\",\"ai.operation.parentId\":\"Test string\",\"ai.operation.rootId\":\"Test string\",\"ai.operation.syntheticSource\":\"Test source\",\"ai.operation.isSynthetic\":false}";
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
}
|
||||
|
||||
@end
|
||||
77
Support/HockeySDKTests/BITUserTests.m
Normal file
77
Support/HockeySDKTests/BITUserTests.m
Normal file
@ -0,0 +1,77 @@
|
||||
#import <XCTest/XCTest.h>
|
||||
#import "BITUser.h"
|
||||
|
||||
@interface BITUserTests : XCTestCase
|
||||
|
||||
@end
|
||||
|
||||
@implementation BITUserTests
|
||||
|
||||
- (void)testaccount_acquisition_datePropertyWorksAsExpected {
|
||||
NSString *expected = @"Test string";
|
||||
BITUser *item = [BITUser new];
|
||||
item.accountAcquisitionDate = expected;
|
||||
NSString *actual = item.accountAcquisitionDate;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
|
||||
expected = @"Other string";
|
||||
item.accountAcquisitionDate = expected;
|
||||
actual = item.accountAcquisitionDate;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
}
|
||||
|
||||
- (void)testaccount_idPropertyWorksAsExpected {
|
||||
NSString *expected = @"Test string";
|
||||
BITUser *item = [BITUser new];
|
||||
item.accountId = expected;
|
||||
NSString *actual = item.accountId;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
|
||||
expected = @"Other string";
|
||||
item.accountId = expected;
|
||||
actual = item.accountId;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
}
|
||||
|
||||
- (void)testuser_agentPropertyWorksAsExpected {
|
||||
NSString *expected = @"Test string";
|
||||
BITUser *item = [BITUser new];
|
||||
item.userAgent = expected;
|
||||
NSString *actual = item.userAgent;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
|
||||
expected = @"Other string";
|
||||
item.userAgent = expected;
|
||||
actual = item.userAgent;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
}
|
||||
|
||||
- (void)testidPropertyWorksAsExpected {
|
||||
NSString *expected = @"Test string";
|
||||
BITUser *item = [BITUser new];
|
||||
item.userId = expected;
|
||||
NSString *actual = item.userId;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
|
||||
expected = @"Other string";
|
||||
item.userId = expected;
|
||||
actual = item.userId;
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
}
|
||||
|
||||
- (void)testSerialize {
|
||||
BITUser *item = [BITUser new];
|
||||
item.accountAcquisitionDate = @"Test string";
|
||||
item.accountId = @"Test string";
|
||||
item.userAgent = @"Test string";
|
||||
item.userId = @"Test string";
|
||||
item.storeRegion = @"Test region";
|
||||
item.authUserId = @"Test authUserId";
|
||||
item.anonUserAcquisitionDate = @"Test anonUserAcquisitionDate";
|
||||
item.authUserAcquisitionDate = @"Test authUserAcquisitionDate";
|
||||
NSString *actual = [item serializeToString];
|
||||
NSString *expected = @"{\"ai.user.accountAcquisitionDate\":\"Test string\",\"ai.user.accountId\":\"Test string\",\"ai.user.userAgent\":\"Test string\",\"ai.user.id\":\"Test string\",\"ai.user.storeRegion\":\"Test region\",\"ai.user.authUserId\":\"Test authUserId\",\"ai.user.anonUserAcquisitionDate\":\"Test anonUserAcquisitionDate\",\"ai.user.authUserAcquisitionDate\":\"Test authUserAcquisitionDate\"}";
|
||||
XCTAssertTrue([actual isEqualToString:expected]);
|
||||
}
|
||||
|
||||
@end
|
||||
Loading…
x
Reference in New Issue
Block a user