Don't know if that's important, but this does not test a case when RegisterNotificationSink is called on already registered sink.
Hi Nikolay,
Don't know if that's important, but this does not test a case when RegisterNotificationSink is called on already registered sink.
I think I did test this scenario myself and the sink would simply be registered twice. I didn't think it was worth adding a test for it, but I can do so if you think it would be beneficial.
Thanks,
On 19.04.2017 0:54, Owen Rudge wrote:
Hi Nikolay,
Don't know if that's important, but this does not test a case when RegisterNotificationSink is called on already registered sink.
I think I did test this scenario myself and the sink would simply be registered twice. I didn't think it was worth adding a test for it, but I can do so if you think it would be beneficial.
Up to you, it was just something I spotted, could be completely irrelevant to your use case. Bigger picture is to get correct notification order too, once you start calling those sinks. For example if you register sink1-sink1-sink2, are they called in the order they were registered or the opposite. Another case, if you register sink1-sink2-sink1-sink2, and the unregister sink1, does it remove both or only first it finds, if so which one, i.e. do you end up with sink2-sink1-sink2, sink1-sink2-sink2, or sink2-sink2.
Thanks,
On 19/04/2017 06:56, Nikolay Sivov wrote:
Up to you, it was just something I spotted, could be completely irrelevant to your use case. Bigger picture is to get correct notification order too, once you start calling those sinks. For example if you register sink1-sink1-sink2, are they called in the order they were registered or the opposite. Another case, if you register sink1-sink2-sink1-sink2, and the unregister sink1, does it remove both or only first it finds, if so which one, i.e. do you end up with sink2-sink1-sink2, sink1-sink2-sink2, or sink2-sink2.
Yes, I think that would be worth testing. At present the sinks themselves are not used, but once I have code implemented that uses them, I will aim to write tests to verify that they are called (and registered/unregistered) in the expected order.
Thanks,