1 // Helper to allow 'same source' unit tests from Moonlight to be executed under NUnit
6 namespace Mono.Moonlight.UnitTesting {
8 public class MoonlightBugAttribute : IgnoreAttribute {
12 namespace Microsoft.VisualStudio.TestTools.UnitTesting {
14 public class TestClassAttribute : TestFixtureAttribute {
17 public class TestMethodAttribute : TestAttribute {
20 public class Assert : NUnit.Framework.Assert {
22 public static void Throws<TException> (Action code, string message) where TException : Exception
24 Type expected_exception = typeof (TException);
30 catch (Exception ex) {
31 if (!(ex.GetType () == expected_exception))
32 Assert.Fail (string.Format ("Expected '{0}', got '{1}'. {2}", expected_exception.FullName, ex.GetType ().FullName, message));
35 Assert.Fail (string.Format ("Expected '{0}', but got no exception. {1}", expected_exception.FullName, message));