-
Notifications
You must be signed in to change notification settings - Fork 197
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
65caed5
commit 3db00f9
Showing
5 changed files
with
74 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// | ||
// QNFixZoneTest.m | ||
// QiniuSDK | ||
// | ||
// Created by yangsen on 2023/9/7. | ||
// Copyright © 2023 Qiniu. All rights reserved. | ||
// | ||
|
||
#import <XCTest/XCTest.h> | ||
#import "QNFixedZone.h" | ||
#import "QNZoneInfo.h" | ||
|
||
@interface QNFixZoneTest : XCTestCase | ||
|
||
@end | ||
|
||
@implementation QNFixZoneTest | ||
|
||
- (void)setUp { | ||
// Put setup code here. This method is called before the invocation of each test method in the class. | ||
} | ||
|
||
- (void)tearDown { | ||
// Put teardown code here. This method is called after the invocation of each test method in the class. | ||
} | ||
|
||
- (void)testCreateByRegionId { | ||
QNFixedZone *zone = [QNFixedZone createWithRegionId:@"na0"]; | ||
QNZoneInfo *zoneInfo = [zone getZonesInfoWithToken:nil].zonesInfo[0]; | ||
|
||
XCTAssert([zoneInfo.regionId isEqualToString:@"na0"], @"regionId:%@", zoneInfo.regionId); | ||
XCTAssert([zoneInfo.domains[0] isEqualToString:@"upload-na0.qiniup.com"], @"domains:%@", zoneInfo.domains); | ||
XCTAssert([zoneInfo.domains[1] isEqualToString:@"up-na0.qiniup.com"], @"domains:%@", zoneInfo.domains); | ||
} | ||
|
||
@end |