Created
November 12, 2009 21:26
-
-
Save KevM/233289 to your computer and use it in GitHub Desktop.
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
public abstract class Context<T> where T : class | |
{ | |
[SetUp] | |
public void Setup() | |
{ | |
_services = new RhinoAutoMocker<T>(MockMode.AAA); | |
OverrideMocks(); | |
_cut = _services.ClassUnderTest; | |
Given(); | |
} | |
public RhinoAutoMocker<T> _services { get; private set; } | |
public T _cut { get; private set; } | |
public SERVICE MockFor<SERVICE>() where SERVICE : class | |
{ | |
return _services.Get<SERVICE>(); | |
} | |
public SERVICE Override<SERVICE>(SERVICE with) where SERVICE : class | |
{ | |
_services.Inject(with); | |
return with; | |
} | |
public virtual void Given() | |
{ | |
} | |
public virtual void OverrideMocks() | |
{ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment