forked from aliyun/aliyun-oss-ios-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOSSClientTests.m
50 lines (37 loc) · 1.69 KB
/
OSSClientTests.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//
// OSSClientTests.m
// AliyunOSSiOSTests
//
// Created by huaixu on 2018/8/10.
// Copyright © 2018年 aliyun. All rights reserved.
//
#import <XCTest/XCTest.h>
#import <AliyunOSSiOS/AliyunOSSiOS.h>
@interface OSSClientTests : XCTestCase
@end
@implementation OSSClientTests
- (void)setUp {
[super 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.
[super tearDown];
}
- (void)testClientWithInvalidEndpoint {
// This is an example of a functional test case.
// Use XCTAssert and related functions to verify your tests produce the correct results.
NSString *endpoint = nil;
XCTAssertThrowsSpecificNamed([[OSSClient alloc] initWithEndpoint:endpoint credentialProvider:nil clientConfiguration:nil], NSException, NSInvalidArgumentException, @"should throw NSInternalInconsistencyException");
endpoint = @"https://1.1.1.1";
XCTAssertThrowsSpecificNamed([[OSSClient alloc] initWithEndpoint:endpoint credentialProvider:nil clientConfiguration:nil], NSException, NSInvalidArgumentException, @"should throw NSInternalInconsistencyException");
endpoint = @"1.1.1.1";
XCTAssertThrowsSpecificNamed([[OSSClient alloc] initWithEndpoint:endpoint credentialProvider:nil clientConfiguration:nil], NSException, NSInvalidArgumentException, @"should throw NSInternalInconsistencyException");
}
- (void)testPerformanceExample {
// This is an example of a performance test case.
[self measureBlock:^{
// Put the code you want to measure the time of here.
}];
}
@end