def test_reset(self): # Arrange actor = MockActor() actor.register_base( trader_id=self.trader_id, msgbus=self.msgbus, cache=self.cache, clock=self.clock, logger=self.logger, ) # Act actor.reset() # Assert assert "on_reset" in actor.calls assert actor.state == ComponentState.INITIALIZED
def test_dispose(self): # Arrange actor = MockActor() actor.register_base( trader_id=self.trader_id, msgbus=self.msgbus, cache=self.cache, clock=self.clock, logger=self.logger, ) actor.reset() # Act actor.dispose() # Assert assert "on_dispose" in actor.calls assert actor.state == ComponentState.DISPOSED