Skip to content

Instantly share code, notes, and snippets.

Created June 29, 2014 15:11
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Example of abstract class I use for unit testing with XUnit
public abstract class UnitTestBase : IUseFixture<UnitTestFixture>{
public void SetFixture(UnitTestFixture data){
Fixture = data;
protected UnitTestFixture Fixture {get;set;}
public virtual void AdditionalFixtureConfiguration(){
public class UnitTestFixture : IDisposable{
public override void Dispose(){
protected virtual void Dispose(bool disposing){
if (!disposing)return;
//Free other managed objects here
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment