Helper for registering, publishing, and indicating interest in a single, named query. Used for testing.
(
&mut self,
scope: &mut S,
rule: Rule,
)
| 525 | /// Helper for registering, publishing, and indicating interest in |
| 526 | /// a single, named query. Used for testing. |
| 527 | pub fn test_single<S: Scope<Timestamp = T>>( |
| 528 | &mut self, |
| 529 | scope: &mut S, |
| 530 | rule: Rule, |
| 531 | ) -> Collection<S, Vec<Value>, isize> { |
| 532 | let interest_name = rule.name.clone(); |
| 533 | let publish_name = rule.name.clone(); |
| 534 | |
| 535 | self.register(Register { |
| 536 | rules: vec![rule], |
| 537 | publish: vec![publish_name], |
| 538 | }) |
| 539 | .unwrap(); |
| 540 | |
| 541 | match self.interest(&interest_name, scope) { |
| 542 | Err(error) => panic!("{:?}", error), |
| 543 | Ok(relation) => relation.probe_with(&mut self.probe), |
| 544 | } |
| 545 | } |
| 546 | } |
| 547 | |
| 548 | impl<Token> Server<Duration, Token> |
no test coverage detected