Skip to content

Commit

Permalink
fix: Adapt test to refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
lebojo committed Oct 16, 2024
1 parent 435f1e3 commit d46d02d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion kDriveTestShared/MCKRouter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public final class MCKRouter: AppNavigable {
logNoop()
}

public func showSaveFileVC(from viewController: UIViewController, driveFileManager: DriveFileManager, file: ImportedFile) {
public func showSaveFileVC(from viewController: UIViewController, driveFileManager: DriveFileManager, files: [ImportedFile]) {
logNoop()
}
}
18 changes: 9 additions & 9 deletions kDriveTests/UTNavigationManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ final class UTNavigationManager: XCTestCase {
}
SimpleResolver.sharedResolver.store(factory: routerFactory)
let expectedFile = ImportedFile(name: "name", path: URL(string: "http://infoamaniak.com")!, uti: .aiff)
let expectedRoute = NavigationRoutes.saveFile(file: expectedFile)
let expectedRoute = NavigationRoutes.saveFiles(files: expectedFile)

// WHEN
@InjectService var router: Routable
Expand Down Expand Up @@ -104,8 +104,8 @@ final class UTNavigationRoutes: XCTestCase {
func testRouteEqual_File() {
// GIVEN
let expectedFile = ImportedFile(name: "name", path: URL(string: "http://infoamaniak.com")!, uti: .aiff)
let routeA = NavigationRoutes.saveFile(file: expectedFile)
let routeB = NavigationRoutes.saveFile(file: expectedFile)
let routeA = NavigationRoutes.saveFiles(files: [expectedFile])
let routeB = NavigationRoutes.saveFiles(files: [expectedFile])

// THEN
XCTAssertEqual(routeA, routeB)
Expand All @@ -115,8 +115,8 @@ final class UTNavigationRoutes: XCTestCase {
// GIVEN
let fileA = ImportedFile(name: "name", path: URL(string: "http://infoamaniak.com")!, uti: .aiff)
let fileB = ImportedFile(name: "name", path: URL(string: "http://infoamaniak.com")!, uti: .jpeg)
let routeA = NavigationRoutes.saveFile(file: fileA)
let routeB = NavigationRoutes.saveFile(file: fileB)
let routeA = NavigationRoutes.saveFiles(files: [fileA])
let routeB = NavigationRoutes.saveFiles(files: [fileB])

// THEN
XCTAssertNotEqual(routeA, routeB)
Expand All @@ -126,8 +126,8 @@ final class UTNavigationRoutes: XCTestCase {
// GIVEN
let fileA = ImportedFile(name: "name", path: URL(string: "http://infoamaniak.com")!, uti: .jpeg)
let fileB = ImportedFile(name: "name", path: URL(string: "http://infoamaniak.ch")!, uti: .jpeg)
let routeA = NavigationRoutes.saveFile(file: fileA)
let routeB = NavigationRoutes.saveFile(file: fileB)
let routeA = NavigationRoutes.saveFiles(files: fileA)
let routeB = NavigationRoutes.saveFiles(files: fileB)

// THEN
XCTAssertNotEqual(routeA, routeB)
Expand All @@ -137,8 +137,8 @@ final class UTNavigationRoutes: XCTestCase {
// GIVEN
let fileA = ImportedFile(name: "name", path: URL(string: "http://infoamaniak.com")!, uti: .jpeg)
let fileB = ImportedFile(name: "another", path: URL(string: "http://infoamaniak.com")!, uti: .jpeg)
let routeA = NavigationRoutes.saveFile(file: fileA)
let routeB = NavigationRoutes.saveFile(file: fileB)
let routeA = NavigationRoutes.saveFiles(files: fileA)
let routeB = NavigationRoutes.saveFiles(files: fileB)

// THEN
XCTAssertNotEqual(routeA, routeB)
Expand Down

0 comments on commit d46d02d

Please sign in to comment.