summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.Test/AssemblyTesting.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-03-08 19:04:01 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2009-03-09 15:48:41 -0700
commit9a2412e3d09139bc008c2d72d688b0c8933d9816 (patch)
tree075be372c548622cb675fa4985e69b3e0a9952da /src/DotNetOpenAuth.Test/AssemblyTesting.cs
parentf299f2feed60969a4933abe793826ccd1a0d75e4 (diff)
downloadDotNetOpenAuth-9a2412e3d09139bc008c2d72d688b0c8933d9816.zip
DotNetOpenAuth-9a2412e3d09139bc008c2d72d688b0c8933d9816.tar.gz
DotNetOpenAuth-9a2412e3d09139bc008c2d72d688b0c8933d9816.tar.bz2
Code Contracts work.. enabling it for just a few classes.
Diffstat (limited to 'src/DotNetOpenAuth.Test/AssemblyTesting.cs')
-rw-r--r--src/DotNetOpenAuth.Test/AssemblyTesting.cs21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/DotNetOpenAuth.Test/AssemblyTesting.cs b/src/DotNetOpenAuth.Test/AssemblyTesting.cs
new file mode 100644
index 0000000..d3ecb8d
--- /dev/null
+++ b/src/DotNetOpenAuth.Test/AssemblyTesting.cs
@@ -0,0 +1,21 @@
+//-----------------------------------------------------------------------
+// <copyright file="AssemblyTesting.cs" company="Andrew Arnott">
+// Copyright (c) Andrew Arnott. All rights reserved.
+// </copyright>
+//-----------------------------------------------------------------------
+
+namespace DotNetOpenAuth.Test {
+ using System.Diagnostics.Contracts;
+ using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+ [TestClass]
+ public class AssemblyTesting {
+ [AssemblyInitialize]
+ public static void AssemblyInitialize(TestContext tc) {
+ Contract.ContractFailed += (sender, e) => {
+ e.Handled = true;
+ Assert.Fail(e.FailureKind.ToString() + ": " + e.DebugMessage);
+ };
+ }
+ }
+}