Fix Naming

Change userService name to templateUserProfileService for templating.
Remove test subclass from MockScreenTest
This commit is contained in:
David Langley
2021-09-11 14:13:43 +01:00
parent 9e8a90ec2a
commit a73d8a4122
9 changed files with 41 additions and 31 deletions
@@ -19,6 +19,6 @@ import Foundation
/// The static list of mocked screens in RiotSwiftUI
@available(iOS 14.0, *)
enum MockAppScreens {
static let appScreens = [MockTemplateProfileUserScreenState.self]
static let appScreens = [MockTemplateUserProfileScreenState.self]
}
@@ -44,6 +44,6 @@ struct ScreenList: View {
@available(iOS 14.0, *)
struct ScreenList_Previews: PreviewProvider {
static var previews: some View {
ScreenList(screens: [MockTemplateProfileUserScreenState.self])
ScreenList(screens: [MockTemplateUserProfileScreenState.self])
}
}
@@ -31,6 +31,10 @@ class MockScreenTest: XCTestCase {
return nil
}
class func createTest() -> MockScreenTest {
return MockScreenTest()
}
var screenState: MockScreenState?
var screenStateKey: String?
let app = XCUIApplication()
@@ -48,13 +52,11 @@ class MockScreenTest: XCTestCase {
return testSuite
}
private class func addTestFor(screenState: MockScreenState, screenStateKey: String, toTestSuite testSuite: XCTestSuite) {
testInvocations.forEach { invocation in
let testCase = TestUserProfileUITests(invocation: invocation)
testCase.screenState = screenState
testCase.screenStateKey = screenStateKey
testSuite.addTest(testCase)
}
class func addTestFor(screenState: MockScreenState, screenStateKey: String, toTestSuite testSuite: XCTestSuite) {
let test = createTest()
test.screenState = screenState
test.screenStateKey = screenStateKey
testSuite.addTest(test)
}
open override func setUpWithError() throws {