summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.Test/AssemblyTesting.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/DotNetOpenAuth.Test/AssemblyTesting.cs')
-rw-r--r--src/DotNetOpenAuth.Test/AssemblyTesting.cs9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/DotNetOpenAuth.Test/AssemblyTesting.cs b/src/DotNetOpenAuth.Test/AssemblyTesting.cs
index fecd97b..bfce6c6 100644
--- a/src/DotNetOpenAuth.Test/AssemblyTesting.cs
+++ b/src/DotNetOpenAuth.Test/AssemblyTesting.cs
@@ -14,8 +14,13 @@ namespace DotNetOpenAuth.Test {
public static void AssemblyInitialize(TestContext tc) {
// Make contract failures become test failures.
Contract.ContractFailed += (sender, e) => {
- e.Handled = true;
- Assert.Fail(e.FailureKind.ToString() + ": " + e.DebugMessage);
+ if (e.FailureKind == ContractFailureKind.Precondition) {
+ // Currently we ignore these so that the regular ErrorUtilities can kick in.
+ e.Handled = true;
+ } else {
+ e.Handled = true;
+ Assert.Fail(e.FailureKind.ToString() + ": " + e.DebugMessage);
+ }
};
}
}