With

With enables the use of stubs created by the Test By Wire framework when calling and asserting methods.

With<IDependency>.Dependency

This syntax enables the extraction of the IDependency interface from the Test By Wire. What implementation is returned depends on the stack of stub declarations in the test's context. To use the syntax in conjunction with executing a test method use it like this:

When.Calling.Execute(With<IDataLayer>.Dependency); 

Last edited Sep 12, 2011 at 7:16 PM by RasmusTherkelsen, version 2

Comments

No comments yet.