Microsoft.VisualStudio.TestTools.cs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. 
  2. using System;
  3. #if CLIENTPROFILE
  4. namespace Microsoft.VisualStudio.TestTools.UnitTesting
  5. {
  6. [AttributeUsage(AttributeTargets.Class, Inherited = true, AllowMultiple = false)]
  7. public sealed class TestClassAttribute : NUnit.Framework.TestFixtureAttribute
  8. {
  9. }
  10. [AttributeUsage(AttributeTargets.Method, Inherited = true, AllowMultiple = false)]
  11. public sealed class TestMethodAttribute : NUnit.Framework.TestAttribute
  12. {
  13. }
  14. [AttributeUsage(AttributeTargets.Method, Inherited = true, AllowMultiple = false)]
  15. public sealed class TestInitializeAttribute : NUnit.Framework.SetUpAttribute
  16. {
  17. }
  18. [AttributeUsage(AttributeTargets.Method, Inherited = true, AllowMultiple = false)]
  19. public sealed class IgnoreAttribute : NUnit.Framework.IgnoreAttribute
  20. {
  21. }
  22. [AttributeUsage(AttributeTargets.Method, Inherited = true, AllowMultiple = false)]
  23. public sealed class ExpectedExceptionAttribute : NUnit.Framework.ExpectedExceptionAttribute
  24. {
  25. public ExpectedExceptionAttribute(Type type) : base(type)
  26. { }
  27. }
  28. public class Assert : NUnit.Framework.Assert
  29. {
  30. [Obsolete("Do not use AreEqual on Byte[], use TestUtil.AssertBytesEqual(,)")]
  31. public static void AreEqual(byte[] b1, byte[] b2)
  32. {
  33. NUnit.Framework.Assert.AreEqual(b1, b2);
  34. }
  35. [Obsolete("No not use assert with miss-matched types.")]
  36. public static new void AreEqual(object b1, object b2)
  37. {
  38. NUnit.Framework.Assert.AreEqual(b1, b2);
  39. }
  40. //Allowed if the types match
  41. public static void AreEqual<T>(T b1, T b2)
  42. {
  43. NUnit.Framework.Assert.AreEqual(b1, b2);
  44. }
  45. }
  46. }
  47. #endif