public void OnAddComponent_should_error_if_unknown_component_id_received() { using (var wrappedOp = WorkerOpFactory.CreateAddComponentOp(TestEntityId, InvalidComponentId)) { Assert.Throws <UnknownComponentIdException>(() => { receiveSystem.OnAddComponent(wrappedOp.Op); }); } }
public void OnAddComponent_should_be_delegated_to_correct_dispatcher() { using (var wrappedOp = WorkerOpFactory.CreateAddComponentOp(TestEntityId, FirstTestComponentId)) { receiveSystem.OnAddComponent(wrappedOp.Op); } Assert.IsTrue(firstComponentDispatcher.HasAddComponentReceived); Assert.IsFalse(secondComponentDispatcher.HasAddComponentReceived); }