@@ -21,17 +21,17 @@ class DispatcherTests: XCTestCase {
2121 ///
2222 func testProcessorEffectivelyGetsRegistered( ) {
2323 let processor = MockActionsProcessor ( )
24- dispatcher. register ( processor: processor, for: SiteAction . self)
25- XCTAssertTrue ( dispatcher. isProcessorRegistered ( processor, for: SiteAction . self) )
24+ dispatcher. register ( processor: processor, for: MockSiteAction . self)
25+ XCTAssertTrue ( dispatcher. isProcessorRegistered ( processor, for: MockSiteAction . self) )
2626 }
2727
2828 /// Verifies that a processor only receives the actions it's been registered to.
2929 ///
3030 func testProcessorsReceiveOnlyRegisteredActions( ) {
31- dispatcher. register ( processor: processor, for: SiteAction . self)
31+ dispatcher. register ( processor: processor, for: MockSiteAction . self)
3232
3333 XCTAssertTrue ( processor. receivedActions. isEmpty)
34- dispatcher. dispatch ( SiteAction . refreshSites)
34+ dispatcher. dispatch ( MockSiteAction . refreshSites)
3535 XCTAssertEqual ( processor. receivedActions. count, 1 )
3636
3737 dispatcher. dispatch ( MockAccountAction . authenticate)
@@ -41,13 +41,13 @@ class DispatcherTests: XCTestCase {
4141 /// Verifies that a registered processor receive all of the posted actions.
4242 ///
4343 func testProcessorsReceiveRegisteredActions( ) {
44- dispatcher. register ( processor: processor, for: SiteAction . self)
44+ dispatcher. register ( processor: processor, for: MockSiteAction . self)
4545 XCTAssertTrue ( processor. receivedActions. isEmpty)
4646
47- dispatcher. dispatch ( SiteAction . refreshSites)
47+ dispatcher. dispatch ( MockSiteAction . refreshSites)
4848 XCTAssertEqual ( processor. receivedActions. count, 1 )
4949
50- dispatcher. dispatch ( SiteAction . refreshSite ( identifier: 123 ) )
50+ dispatcher. dispatch ( MockSiteAction . refreshSite ( identifier: 123 ) )
5151 XCTAssertEqual ( processor. receivedActions. count, 2 )
5252 }
5353
@@ -56,23 +56,23 @@ class DispatcherTests: XCTestCase {
5656 func testUnregisteredProcessorsDoNotReceiveAnyActions( ) {
5757 XCTAssertTrue ( processor. receivedActions. isEmpty)
5858
59- dispatcher. register ( processor: processor, for: SiteAction . self)
60- dispatcher. dispatch ( SiteAction . refreshSites)
59+ dispatcher. register ( processor: processor, for: MockSiteAction . self)
60+ dispatcher. dispatch ( MockSiteAction . refreshSites)
6161 XCTAssertEqual ( processor. receivedActions. count, 1 )
6262
6363 dispatcher. unregister ( processor: processor)
64- dispatcher. dispatch ( SiteAction . refreshSites)
64+ dispatcher. dispatch ( MockSiteAction . refreshSites)
6565 dispatcher. dispatch ( MockAccountAction . authenticate)
6666 XCTAssertEqual ( processor. receivedActions. count, 1 )
6767 }
6868
6969 /// Verifies that the Dispatcher does not strongly retain the ActionsProcessors.
7070 ///
7171 func testProcessorsAreNotStronglyRetainedByDispatcher( ) {
72- dispatcher. register ( processor: processor, for: SiteAction . self)
73- XCTAssertNotNil ( dispatcher. processor ( for: SiteAction . self) )
72+ dispatcher. register ( processor: processor, for: MockSiteAction . self)
73+ XCTAssertNotNil ( dispatcher. processor ( for: MockSiteAction . self) )
7474 processor = nil
7575
76- XCTAssertNil ( dispatcher. processor ( for: SiteAction . self) )
76+ XCTAssertNil ( dispatcher. processor ( for: MockSiteAction . self) )
7777 }
7878}
0 commit comments