-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve UserCollectionPresenter sort tests
- Loading branch information
Showing
3 changed files
with
55 additions
and
4 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,31 @@ | ||
// | ||
// PopoverMenuManagerSpy.swift | ||
// SWDestinyTradesTests | ||
// | ||
// Created by Diogo Autilio on 23/03/24. | ||
// Copyright © 2024 Diogo Autilio. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
import UIKit | ||
|
||
@testable import SWDestinyTrades | ||
|
||
final class PopoverMenuManagerSpy: PopoverMenuManagerType { | ||
|
||
private(set) var didCallShowPopoverMenuCount = 0 | ||
var executeDoneBlock = false | ||
var executeCancelBlock = false | ||
func showPopoverMenu(forEvent event: UIEvent, | ||
with menuArray: [String], | ||
done: ((NSInteger) -> Void)?, | ||
cancel: (() -> Void)?) { | ||
didCallShowPopoverMenuCount += 1 | ||
if executeDoneBlock { | ||
done?(0) | ||
} | ||
if executeCancelBlock { | ||
cancel?() | ||
} | ||
} | ||
} |
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