-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
218 additions
and
0 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
6 changes: 6 additions & 0 deletions
6
packages/patrol/example/ios/RunnerTests/RunnerTests-Bridging-Header.h
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,6 @@ | ||
// | ||
// Use this file to import your target's public headers that you would like to | ||
// expose to Swift. | ||
// | ||
|
||
#import "PatrolIntegrationTestRunner.h" |
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,42 @@ | ||
// TODO: Run these tests on CI | ||
|
||
import XCTest | ||
import patrol | ||
|
||
final class RunnerTests: XCTestCase { | ||
func testCreateMethodNameFromPatrolGeneratedGroup_ExampleWithDotAndUnderscore() { | ||
let input = "example.example_test" | ||
let expectedOutput = "example_exampleTest" | ||
|
||
let result = PatrolUtils.createMethodName(fromPatrolGeneratedGroup: input) | ||
XCTAssertEqual(result, expectedOutput) | ||
} | ||
|
||
func testCreateMethodNameFromPatrolGeneratedGroup_ExampleWithUnderscoreOnly() { | ||
let input = "example_test" | ||
let expectedOutput = "exampleTest" | ||
let result = PatrolUtils.createMethodName(fromPatrolGeneratedGroup: input) | ||
XCTAssertEqual(result, expectedOutput) | ||
} | ||
|
||
func testCreateMethodNameFromPatrolGeneratedGroup_ExampleWithMultipleDotsAndUnderscores() { | ||
let input = "flows.login.sign_in" | ||
let expectedOutput = "flows_login_signIn" | ||
let result = PatrolUtils.createMethodName(fromPatrolGeneratedGroup: input) | ||
XCTAssertEqual(result, expectedOutput) | ||
} | ||
|
||
func testCreateMethodNameFromPatrolGeneratedGroup_ExampleWithSingleComponent() { | ||
let input = "single" | ||
let expectedOutput = "single" | ||
let result = PatrolUtils.createMethodName(fromPatrolGeneratedGroup: input) | ||
XCTAssertEqual(result, expectedOutput) | ||
} | ||
|
||
func testCreateMethodNameFromPatrolGeneratedGroup_ExampleWithEmptyString() { | ||
let input = "" | ||
let expectedOutput = "" | ||
let result = PatrolUtils.createMethodName(fromPatrolGeneratedGroup: input) | ||
XCTAssertEqual(result, expectedOutput) | ||
} | ||
} |