Quantcast
Channel: patterns & practices: Prism
Viewing all articles
Browse latest Browse all 1878

New Post: Prism and Dependency Injection - Unit Testing

$
0
0
Dear Prism developpers,

Could someone be so kind and explain why are the RequestNavigate methods for IRegionManager defined in RegionManagerExtensions as extension methods?

How can I UnitTest that?
Wouldn't it be lovely to write:
var regionManager= Substitute.For<IRegionManager>();
regionManager.Received().RequestNavigate(Arg.Any<string>,Arg.Any<string>);

I'm also wondering why IInteractionRequest is not defined as IInteractionRequest<T> where T: Notification and defining void Raise(T context) and void Raise(T context, Action<T> callback)?

I know, I know, you're probably going to answer: we didn't want to break the interfaces, ect...

But now, you've got hundreds of developpers who need to implement dummy classes and interfaces to extend what's missing...
:-(

Additional question: why is PopupChildWindowAction not available for WPF?

Thanks a lot for all your good and time (if not life)-saving work,
Stephan

Viewing all articles
Browse latest Browse all 1878

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>