-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
5 changed files
with
249 additions
and
2 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,49 @@ | ||
// | ||
// OrderSourceTest.swift | ||
// DXFeedFrameworkTests | ||
// | ||
// Created by Aleksey Kosylo on 10.10.23. | ||
// | ||
|
||
import XCTest | ||
@testable import DXFeedFramework | ||
|
||
final class OrderSourceTest: XCTestCase { | ||
|
||
override func setUpWithError() throws { | ||
// Put setup code here. This method is called before the invocation of each test method in the class. | ||
} | ||
|
||
override func tearDownWithError() throws { | ||
// Put teardown code here. This method is called after the invocation of each test method in the class. | ||
} | ||
|
||
|
||
func testIsSpecialSource() throws { | ||
XCTAssert(OrderSource.isSpecialSourceId(sourceId: 1)) | ||
XCTAssert(!OrderSource.isSpecialSourceId(sourceId: 10)) | ||
XCTAssert(OrderSource.isSpecialSourceId(sourceId: 2)) | ||
} | ||
|
||
func testCompose() throws { | ||
let res = try OrderSource.composeId(name: "1234") | ||
XCTAssert(res == 825373492) | ||
} | ||
|
||
func testCheckChar() throws { | ||
do { | ||
try OrderSource.check(char: "a") | ||
} catch { | ||
XCTAssert(false, "\(error)") | ||
} | ||
} | ||
|
||
func testDecode() throws { | ||
do { | ||
let res = try OrderSource.decodeName(identifier: 1) | ||
print(res) | ||
} catch { | ||
print("\(error)") | ||
} | ||
} | ||
} |