public void OnAuthorityChange_should_error_if_unknown_component_id_received() { using (var wrappedOp = WorkerOpFactory.CreateAuthorityChangeOp(TestEntityId, InvalidComponentId)) { Assert.Throws <UnknownComponentIdException>(() => { receiveSystem.OnAuthorityChange(wrappedOp.Op); }); } }
public void OnAuthorityChange_should_be_delegated_to_correct_dispatcher() { using (var wrappedOp = WorkerOpFactory.CreateAuthorityChangeOp(TestEntityId, FirstTestComponentId)) { receiveSystem.OnAuthorityChange(wrappedOp.Op); } Assert.IsTrue(firstComponentDispatcher.HasAuthorityChangedReceived); Assert.IsFalse(secondComponentDispatcher.HasAuthorityChangedReceived); }