<code>
public class Foo
{
public void Execute( string name, Dictionary<string,string props>
();
}
</code>
The props is complex class that uses reference equality, and I don't
have access to the actual object (it's buried deep in code). However,
I want to test that the method Execute to see if it ran, not caring
what the value of props is.
How do I do this?
mock.Setup(x => x.Execute(It.IsAny<Dictionary<string, string>>()))</untested> :)--
Post: moq...@googlegroups.com
Unsubscribe: moqdisc-u...@googlegroups.com
mock.Verify(x => x.Execute(It.IsAny<String>(),
It.IsAny<Dictionary<string, string>>()));
ema
http://blog.codiceplastico.com
On Jan 13, 3:24 am, Emanuele DelBono <codiceplast...@gmail.com> wrote:
> A little modification on Chris's code:
>
> mock.Verify(x => x.Execute(It.IsAny<String>(),
> It.IsAny<Dictionary<string, string>>()));
>
> emahttp://blog.codiceplastico.com
>
>
>
> On Tue, Jan 12, 2010 at 10:06 PM, Andrew Ryan <andrew1...@gmail.com> wrote:
> > I have a class with a method that calls out with
> > Dictionary<string,string> like:
>
> > <code>
>
> > public class Foo
> > {
> > public void Execute( string name, Dictionary<string,string props>
> > ();
> > }
>
> > </code>
>
> > The props is complex class that uses reference equality, and I don't
> > have access to the actual object (it's buried deep in code). However,
> > I want to test that the method Execute to see if it ran, not caring
> > what the value of props is.
>
> > How do I do this?
>
> > --
> > Post: moq...@googlegroups.com
> > Unsubscribe: moqdisc-u...@googlegroups.com- Hide quoted text -
>
> - Show quoted text -