Examples.EEventBroker.WithSub
(event_broker v1.1.1)
Copy Markdown
I contain examples of how the with_subscription block works.
Summary
Functions
I check that, when a process is subscribed to a given filter, that filter
still exists after a with_subscription block that uses the same filter.
I nest two with_subscription blocks and assert that the middle one is subscribed to the outer topics as well.
I run a piece of code with a subscription. I assert that the messages sent within this block are sent to me.
I run a piece of code with a subscription to multiple filters. I assert that the messages sent within this block are sent to me.
Callback implementation for ExExample.Behaviour.copy/1.
Callback implementation for ExExample.Behaviour.rerun?/1.
Functions
I check that, when a process is subscribed to a given filter, that filter
still exists after a with_subscription block that uses the same filter.
__ex_example__with_nested_subscription__(list \\ [%{__struct__: Examples.EEventBroker.EFilter.AcceptAll}, %{__struct__: Examples.EEventBroker.EFilter.Error}])
I nest two with_subscription blocks and assert that the middle one is subscribed to the outer topics as well.
I run a piece of code with a subscription. I assert that the messages sent within this block are sent to me.
__ex_example__with_subscriptions__(filters \\ [%{__struct__: Examples.EEventBroker.EFilter.AcceptAll}, %{__struct__: Examples.EEventBroker.EFilter.Error}])
I run a piece of code with a subscription to multiple filters. I assert that the messages sent within this block are sent to me.
Callback implementation for ExExample.Behaviour.copy/1.
Callback implementation for ExExample.Behaviour.rerun?/1.