Exemple #1
0
        internal static void TestProperties(ClrRuntime runtime)
        {
            ClrThread    thread = runtime.Threads.Where(t => !t.IsFinalizer).Single();
            ClrException ex     = thread.CurrentException;

            Assert.NotNull(ex);

            ExceptionTestData testData = TestTargets.NestedExceptionData;

            Assert.Equal(testData.OuterExceptionMessage, ex.Message);
            Assert.Equal(testData.OuterExceptionType, ex.Type.Name);
            Assert.NotNull(ex.Inner);
        }
Exemple #2
0
        internal static void TestProperties(ClrRuntime runtime)
        {
            ClrThread    thread     = runtime.GetMainThread();
            ClrException?exNullable = thread.CurrentException;

            Assert.NotNull(exNullable);

            ClrException ex = exNullable.GetValueOrDefault();

            ExceptionTestData testData = TestTargets.NestedExceptionData;

            Assert.Equal(testData.OuterExceptionMessage, ex.Message);
            Assert.Equal(testData.OuterExceptionType, ex.Type.Name);
            Assert.NotNull(ex.Inner);
        }
Exemple #3
0
        internal static void TestProperties(ClrRuntime runtime)
        {
            ClrThread    thread = runtime.GetMainThread();
            ClrException ex     = thread.CurrentException;

            Assert.NotNull(ex);

            ExceptionTestData testData = TestTargets.NestedExceptionData;

            Assert.Equal(testData.OuterExceptionMessage, ex.Message);
            if (ex.Type.Name != null)
            {
                Assert.Equal(testData.OuterExceptionType, ex.Type.Name);
            }
            Assert.NotNull(ex.Inner);
        }