mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-20 16:42:44 +02:00
Fix Naming
Change userService name to templateUserProfileService for templating. Remove test subclass from MockScreenTest
This commit is contained in:
+4
-4
@@ -21,7 +21,7 @@ import SwiftUI
|
||||
/// Using an enum for the screen allows you define the different state cases with
|
||||
/// the relevant associated data for each case.
|
||||
@available(iOS 14.0, *)
|
||||
enum MockTemplateProfileUserScreenState: MockScreenState, CaseIterable {
|
||||
enum MockTemplateUserProfileScreenState: MockScreenState, CaseIterable {
|
||||
// A case for each state you want to represent
|
||||
// with specific, minimal associated data that will allow you
|
||||
// mock that screen.
|
||||
@@ -34,9 +34,9 @@ enum MockTemplateProfileUserScreenState: MockScreenState, CaseIterable {
|
||||
}
|
||||
|
||||
/// A list of screen state definitions
|
||||
static var allCases: [MockTemplateProfileUserScreenState] {
|
||||
static var allCases: [MockTemplateUserProfileScreenState] {
|
||||
// Each of the presence statuses
|
||||
TemplateUserProfilePresence.allCases.map(MockTemplateProfileUserScreenState.presence)
|
||||
TemplateUserProfilePresence.allCases.map(MockTemplateUserProfileScreenState.presence)
|
||||
// A long display name
|
||||
+ [.longDisplayName("Somebody with a super long name we would like to test")]
|
||||
}
|
||||
@@ -50,7 +50,7 @@ enum MockTemplateProfileUserScreenState: MockScreenState, CaseIterable {
|
||||
case .longDisplayName(let displayName):
|
||||
service = MockTemplateUserProfileService(displayName: displayName)
|
||||
}
|
||||
let viewModel = TemplateUserProfileViewModel(userService: service)
|
||||
let viewModel = TemplateUserProfileViewModel(templateUserProfileService: service)
|
||||
|
||||
// can simulate service and viewModel actions here if needs be.
|
||||
|
||||
Reference in New Issue
Block a user