Created
October 5, 2014 20:39
-
-
Save joebuschmann/16035ad4645574c39519 to your computer and use it in GitHub Desktop.
Specflow CompareToInstance<T>() without generic parameter
This file contains hidden or 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 static void CompareToInstance(this Table table, object instance) | |
{ | |
AssertThatTheInstanceExists(instance); | |
var instanceTable = TEHelpers.GetTheProperInstanceTable(table, instance.GetType()); | |
var differences = FindAnyDifferences(instanceTable, instance); | |
if (ThereAreAnyDifferences(differences)) | |
ThrowAnExceptionThatDescribesThoseDifferences(differences); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment