MockTableView.swift 724 B

1234567891011121314151617181920212223242526272829
  1. //
  2. // MockTableView.swift
  3. // SheeeeeeeeetTests
  4. //
  5. // Created by Daniel Saidi on 2018-10-17.
  6. // Copyright © 2018 Daniel Saidi. All rights reserved.
  7. //
  8. import UIKit
  9. import Sheeeeeeeeet
  10. class MockTableView: ActionSheetTableView {
  11. var deselectRowInvokeCount = 0
  12. var deselectRowInvokePaths = [IndexPath]()
  13. var deselectRowInvokeAnimated = [Bool]()
  14. var reloadDataInvokeCount = 0
  15. override func deselectRow(at indexPath: IndexPath, animated: Bool) {
  16. deselectRowInvokeCount += 1
  17. deselectRowInvokePaths.append(indexPath)
  18. deselectRowInvokeAnimated.append(animated)
  19. }
  20. override func reloadData() {
  21. super.reloadData()
  22. reloadDataInvokeCount += 1
  23. }
  24. }