You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add next code to register mock and objec with one call #7
This speeds up registering custom mock in base class of test (e.g. MyRepository) and then resolving mock in child to tune base behavior:
public static class UnityMoqContainerExtensions
{
public static IUnityContainer RegisterMock<T>(this IUnityContainer self, Mock<T> mock)
where T:class
{
return self.RegisterInstance(mock).RegisterInstance(mock.Object);
}
}
Activity