Last active
August 29, 2015 14:16
-
-
Save JayBazuzi/3122a1f93b2eb7596d93 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
abstract class AdapterTestsBase | |
{ | |
public abstract IPort CreateSubject(); | |
[TestMethod] | |
public void FShouldBlah() | |
{ | |
IPort subject = CreateSubject(); | |
int result = subject.F(); | |
Assert.AreEqual(7, result); | |
} | |
// More tests here... | |
} | |
[TestClass] | |
class RealAdapterTests : AdapterTestsBase | |
{ | |
public override IPort CreateSubject() | |
{ | |
return new RealAdapter(); | |
} | |
} | |
[TestClass] | |
class InMemoryAdapterTests : AdapterTestsBase | |
{ | |
public override IPort CreateSubject() | |
{ | |
return new InMemoryAdapter(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment