mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-01 16:06:59 +00:00

git-subtree-dir: submodules/HockeySDK-iOS git-subtree-mainline: 085acd26c4432939403765234266e3c1be0f3dd9 git-subtree-split: c7d0c7026303253e2ac576c02655691e5d314fe2
34 lines
990 B
Objective-C
34 lines
990 B
Objective-C
#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";
|
|
NSDictionary *actual = [item serializeToDictionary];
|
|
NSDictionary *expected = @{@"ai.application.ver":@"Test string", @"ai.application.build":@"Test build", @"ai.application.typeId":@"Test typeId"};
|
|
XCTAssertTrue([actual isEqualToDictionary:expected]);
|
|
}
|
|
|
|
@end
|