-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move remaining tests to
CoreAPITests/
- Loading branch information
Showing
26 changed files
with
242 additions
and
199 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import Foundation | ||
|
||
/// Error domain of `NSError` instances that are converted from `WordPressComRestApiEndpointError` | ||
/// and `WordPressAPIError<WordPressComRestApiEndpointError>` instances. | ||
/// | ||
/// See `extension WordPressComRestApiEndpointError: CustomNSError` for context. | ||
let WordPressComRestApiErrorDomain = "WordPressKit.WordPressComRestApiError" | ||
|
||
// WordPressComRestApiErrorDomain is accessible only in Swift and, since it's a global, cannot be made @objc. | ||
// As a workaround, here is a builder to init NSError with that domain and a method to check the domain. | ||
@objc | ||
public extension NSError { | ||
|
||
@objc | ||
static func wordPressComRestApiError( | ||
code: Int, | ||
userInfo: [String: Any]? | ||
) -> NSError { | ||
NSError( | ||
domain: WordPressComRestApiErrorDomain, | ||
code: code, | ||
userInfo: userInfo | ||
) | ||
} | ||
|
||
@objc | ||
func hasWordPressComRestApiErrorDomain() -> Bool { | ||
domain == WordPressComRestApiErrorDomain | ||
} | ||
} |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
4 changes: 4 additions & 0 deletions
4
...s/AppTransportSecuritySettingsTests.swift → ...s/AppTransportSecuritySettingsTests.swift
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
5 changes: 4 additions & 1 deletion
5
...es/FakeInfoDictionaryObjectProvider.swift → ...ts/FakeInfoDictionaryObjectProvider.swift
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
6 changes: 5 additions & 1 deletion
6
...ts/WordPressAPI/NonceRetrievalTests.swift → Tests/CoreAPITests/NonceRetrievalTests.swift
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
5 changes: 4 additions & 1 deletion
5
...ests/Tests/Utilities/RSDParserTests.swift → Tests/CoreAPITests/RSDParserTests.swift
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
Oops, something went wrong.