Moq Example using out and ref needed -
I'm trying to test against some legacy method that applies the parameter Can you give me an example How are you doing this?
simply assign
or test riff
Parameter.
Looking at this interface:
Public Interface ILegacy {Bull Foo (outside string bar); }
You can write an exam like this:
[TestMethod] Public Zero Test13 ( ) {String bar = "ploh"; Var legacy stub = new fake & lt; ILegacy & gt; (); Legacy stub .Setup (L = & gt; L. Fu (Out Bar)). Return (true); Assurance ITRT (Legacy stub.foo (out bar)); Assurance Requel ("ploh", bar); }
Comments
Post a Comment