Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

return value of a mocked value will be as the input c#

//interface:
string DoSomething(string one, string two);

//test class:
_mock.Setup(x => x.DoSomething(It.IsAny<string>(),It.IsAny<string>(),It.IsAny<string>())
     .Returns((string one, string two) => string.Concat(one,two));
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #return #mocked #input
ADD COMMENT
Topic
Name
9+2 =