Last active
August 29, 2015 13:58
-
-
Save DavidBasarab/10395380 to your computer and use it in GitHub Desktop.
Moq extensions to have the same call return in order different results.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| internal static class MoqExtensions | |
| { | |
| public static void ReturnsInOrder<T, TResult>(this ISetup<T, TResult> setup, params TResult[] results) where T : class | |
| { | |
| setup.Returns(new Queue<TResult>(results).Dequeue); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment