Last active
August 29, 2015 14:07
-
-
Save joebuschmann/0efa93da64b19e6c2576 to your computer and use it in GitHub Desktop.
Specflow CompareToInstance<T>() with 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<T>(this Table table, T instance) | |
{ | |
AssertThatTheInstanceExists(instance); | |
var instanceTable = TEHelpers.GetTheProperInstanceTable(table, typeof(T)); | |
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