Skip to content

Navigator_DidAppearInvocation

ohitsdaniel edited this page Apr 29, 2021 · 2 revisions

Navigator.DidAppearInvocation

Testing helper

struct DidAppearInvocation: Hashable 

Example

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

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

 sut.didAppear(id: expectedID) // invoke code that invokes dismissSuccessor(of:)

 XCTAssertEqual(expectectedInvocations, invocations)

Inheritance

Hashable

Properties

id

let id: ScreenID
Clone this wiki locally