aboutsummaryrefslogtreecommitdiff
path: root/csharp/lib/NUnit-config
diff options
context:
space:
mode:
authorJan Tattermusch <jtattermusch@google.com>2015-04-16 09:55:22 -0700
committerJan Tattermusch <jtattermusch@google.com>2015-04-16 09:55:22 -0700
commit84fa3e2bbc876428efd0c99700f146115a9d5162 (patch)
tree47baa5dafe3c3ab1c49fe2ca44e9f3ffd0e0b127 /csharp/lib/NUnit-config
parent813d6d652d8091e9365bfbd01efb5f2ee8bdfbce (diff)
parent836a273544f55c88d8d0988ef0117cb0636707c6 (diff)
downloadprotobuf-84fa3e2bbc876428efd0c99700f146115a9d5162.tar.gz
protobuf-84fa3e2bbc876428efd0c99700f146115a9d5162.tar.bz2
protobuf-84fa3e2bbc876428efd0c99700f146115a9d5162.zip
Imported protobuf-csharp-port into csharp/ tree
Diffstat (limited to 'csharp/lib/NUnit-config')
-rw-r--r--csharp/lib/NUnit-config/Microsoft.VisualStudio.TestTools.cs54
-rw-r--r--csharp/lib/NUnit-config/nunit-console.v2.0.config18
-rw-r--r--csharp/lib/NUnit-config/nunit-console.v3.5.config18
-rw-r--r--csharp/lib/NUnit-config/nunit-console.v4.0.config18
4 files changed, 108 insertions, 0 deletions
diff --git a/csharp/lib/NUnit-config/Microsoft.VisualStudio.TestTools.cs b/csharp/lib/NUnit-config/Microsoft.VisualStudio.TestTools.cs
new file mode 100644
index 00000000..fd151dae
--- /dev/null
+++ b/csharp/lib/NUnit-config/Microsoft.VisualStudio.TestTools.cs
@@ -0,0 +1,54 @@
+
+using System;
+#if CLIENTPROFILE
+namespace Microsoft.VisualStudio.TestTools.UnitTesting
+{
+ [AttributeUsage(AttributeTargets.Class, Inherited = true, AllowMultiple = false)]
+ public sealed class TestClassAttribute : NUnit.Framework.TestFixtureAttribute
+ {
+ }
+
+ [AttributeUsage(AttributeTargets.Method, Inherited = true, AllowMultiple = false)]
+ public sealed class TestMethodAttribute : NUnit.Framework.TestAttribute
+ {
+ }
+
+ [AttributeUsage(AttributeTargets.Method, Inherited = true, AllowMultiple = false)]
+ public sealed class TestInitializeAttribute : NUnit.Framework.SetUpAttribute
+ {
+ }
+
+ [AttributeUsage(AttributeTargets.Method, Inherited = true, AllowMultiple = false)]
+ public sealed class IgnoreAttribute : NUnit.Framework.IgnoreAttribute
+ {
+ }
+
+ [AttributeUsage(AttributeTargets.Method, Inherited = true, AllowMultiple = false)]
+ public sealed class ExpectedExceptionAttribute : NUnit.Framework.ExpectedExceptionAttribute
+ {
+ public ExpectedExceptionAttribute(Type type) : base(type)
+ { }
+ }
+
+ public class Assert : NUnit.Framework.Assert
+ {
+ [Obsolete("Do not use AreEqual on Byte[], use TestUtil.AssertBytesEqual(,)")]
+ public static void AreEqual(byte[] b1, byte[] b2)
+ {
+ NUnit.Framework.Assert.AreEqual(b1, b2);
+ }
+
+ [Obsolete("No not use assert with miss-matched types.")]
+ public static new void AreEqual(object b1, object b2)
+ {
+ NUnit.Framework.Assert.AreEqual(b1, b2);
+ }
+
+ //Allowed if the types match
+ public static void AreEqual<T>(T b1, T b2)
+ {
+ NUnit.Framework.Assert.AreEqual(b1, b2);
+ }
+ }
+}
+#endif \ No newline at end of file
diff --git a/csharp/lib/NUnit-config/nunit-console.v2.0.config b/csharp/lib/NUnit-config/nunit-console.v2.0.config
new file mode 100644
index 00000000..30453c9b
--- /dev/null
+++ b/csharp/lib/NUnit-config/nunit-console.v2.0.config
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<configuration>
+
+ <startup>
+ <requiredRuntime version="v2.0.50727" />
+ </startup>
+
+ <runtime>
+ <!-- We need this so test exceptions don't crash NUnit -->
+ <legacyUnhandledExceptionPolicy enabled="1" />
+
+ <!-- Look for addins in the addins directory for now -->
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <probing privatePath="lib;addins"/>
+ </assemblyBinding>
+ </runtime>
+
+</configuration> \ No newline at end of file
diff --git a/csharp/lib/NUnit-config/nunit-console.v3.5.config b/csharp/lib/NUnit-config/nunit-console.v3.5.config
new file mode 100644
index 00000000..30453c9b
--- /dev/null
+++ b/csharp/lib/NUnit-config/nunit-console.v3.5.config
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<configuration>
+
+ <startup>
+ <requiredRuntime version="v2.0.50727" />
+ </startup>
+
+ <runtime>
+ <!-- We need this so test exceptions don't crash NUnit -->
+ <legacyUnhandledExceptionPolicy enabled="1" />
+
+ <!-- Look for addins in the addins directory for now -->
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <probing privatePath="lib;addins"/>
+ </assemblyBinding>
+ </runtime>
+
+</configuration> \ No newline at end of file
diff --git a/csharp/lib/NUnit-config/nunit-console.v4.0.config b/csharp/lib/NUnit-config/nunit-console.v4.0.config
new file mode 100644
index 00000000..08ee9547
--- /dev/null
+++ b/csharp/lib/NUnit-config/nunit-console.v4.0.config
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<configuration>
+
+ <startup useLegacyV2RuntimeActivationPolicy="true">
+ <requiredRuntime version="v4.0.30319" safemode="true"/>
+ </startup>
+
+ <runtime>
+ <!-- We need this so test exceptions don't crash NUnit -->
+ <legacyUnhandledExceptionPolicy enabled="1" />
+
+ <!-- Look for addins in the addins directory for now -->
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <probing privatePath="lib;addins"/>
+ </assemblyBinding>
+ </runtime>
+
+</configuration> \ No newline at end of file