Created
February 26, 2015 11:58
-
-
Save BanksySan/dc8170f9a50a61dbd95b to your computer and use it in GitHub Desktop.
Moq Extensions
This file contains 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
namespace BanksySan.Logging.Tests.Helpers | |
{ | |
using System.Collections.Generic; | |
using Moq.Language.Flow; | |
public 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); | |
} | |
public static void ReturnsInOrder<T, TResult>( | |
this ISetupGetter<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