Closed aitoroses closed 1 year ago
Hi @aitoroses, that should be a fairly trivial implementation with a HashMap but I don't think it's what you need.
If you need to test a view, you should just test it directly. If you are using a GenericQuery
then you should test the object that implements the View
trait`. That might look something like
let mut view = MyView::default();
view.update(&EventEnvelope{
aggregate_id: "my-aggregate-12345".to_string(),
sequence: 0,
payload: MyEvents::SomethingWasDone,
metadata: Default::default(),
});
... add asserts here...
Would there be a possibiliy to add an
MemViewRepository
?