V
V
Valera Figol2017-04-26 11:10:19
C++ / C#
Valera Figol, 2017-04-26 11:10:19

When to use Returns and when to use ReturnsAsync?

Please tell me when to use Returns() and when to use ReturnsAsync() in C# unit testing

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Valera Figol, 2017-05-03
@Kamrit

I found solutions to use Returns for regular methods, and ReturnsAsycn for asynchronous ones, although you can use Returns for asynchronous ones in this way:.Reutrns(Task.FromResult(Object obj);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question