public void CanAddMultipleHandlersToEcosystem() { var ecosystem = TestEco(); var handler1 = new MockHandler1(); var handler2 = new MockHandler2(); ecosystem .AddHandlers(handler1, handler2) .Update(); Assert.Equal(1, handler1.Called); Assert.Equal(1, handler2.Called); }
public void CanClearHandlersFromEcosystemWithEntities() { var ecosystem = CreateEcosystemWithEntities(); var handler1 = new MockHandler1(); var handler2 = new MockHandler2(); ecosystem .AddHandlers(handler1, handler2) .ClearHandlers() .Update(); Assert.Equal(0, handler1.Called); Assert.Equal(0, handler2.Called); }