示例#1
0
    def test_initialization(self):
        # Arrange
        actor = Actor(config=ActorConfig(component_id=self.component_id))
        actor.register_base(
            trader_id=self.trader_id,
            msgbus=self.msgbus,
            cache=self.cache,
            clock=self.clock,
            logger=self.logger,
        )

        # Act, Assert
        assert actor.state == ComponentState.INITIALIZED
        assert actor.is_initialized
示例#2
0
    def test_register_warning_event(self):
        # Arrange
        actor = Actor(config=ActorConfig(component_id=self.component_id))
        actor.register_base(
            trader_id=self.trader_id,
            msgbus=self.msgbus,
            cache=self.cache,
            clock=self.clock,
            logger=self.logger,
        )

        # Act
        actor.register_warning_event(OrderDenied)

        # Assert
        assert True  # Exception not raised