mock: Add subscribe() stubs to MockStore and FakeStore
@@ -76,19 +76,12 @@ impl BasicStore for MockStore {
}
impl Store for MockStore {
- fn event_stream(&mut self) -> Result<Receiver<StoreEvent>, StreamError> {
- // If possible, create a new channel for streaming store events
- let result = match self.event_sink {
- Some(_) => Err(StreamError::AlreadyCreated),
- None => {
- let (sink, stream) = channel(100);
- self.event_sink = Some(sink);
- Ok(stream)
- }
- };
-
- self.generate_mock_events();
- result
+ fn subscribe(
+ &mut self,
+ subgraph: String,
+ entities: Vec<String>,
+ ) -> Box<Stream<Item = EntityChange, Error = ()> + Send> {
+ unimplemented!();
}
}
@@ -113,7 +106,11 @@ impl BasicStore for FakeStore {
}
impl Store for FakeStore {
- fn event_stream(&mut self) -> Result<Receiver<StoreEvent>, StreamError> {
- panic!("called FakeStore")
+ fn subscribe(
+ &mut self,
+ subgraph: String,
+ entities: Vec<String>,
+ ) -> Box<Stream<Item = EntityChange, Error = ()> + Send> {
+ unimplemented!();
}
}
