Skip to content

Navigator_DismissInvocation

ohitsdaniel edited this page Apr 29, 2021 · 2 revisions

Navigator.DismissInvocation

Testing helper

struct DismissInvocation: Hashable 

Example

 var invocations = [Navigator.DismissInvocation]()
 let expectectedInvocations = [
   Navigator.DismissInvocation(identifier: .id(expectedID))
 ]

 let sut = Navigator.mock(
   path: { self.path },
   dismiss: { id in
     invocations.append(.init(id: id))
   }
 )

 sut.dismiss(id: expectedID) // invoke code that invokes dismiss(id:)

 XCTAssertEqual(expectectedInvocations, invocations)

Inheritance

Hashable

Properties

identifier

let identifier: NavigationIdentifier
Clone this wiki locally