상속: MemberAccessException
예제 #1
0
 public static void Ctor_String()
 {
     string message = "Created FieldAccessException";
     var exception = new FieldAccessException(message);
     Assert.Equal(message, exception.Message);
     Assert.Equal(COR_E_FIELDACCESS, exception.HResult);
 }
예제 #2
0
 public static void Ctor_String_Exception()
 {
     string message = "Created FieldAccessException";
     var innerException = new Exception("Created inner exception");
     var exception = new FieldAccessException(message, innerException);
     Assert.Equal(message, exception.Message);
     Assert.Equal(COR_E_FIELDACCESS, exception.HResult);
     Assert.Same(innerException, exception.InnerException);
     Assert.Equal(innerException.HResult, exception.InnerException.HResult);
 }
예제 #3
0
 public static void Ctor_Empty()
 {
     var exception = new FieldAccessException();
     Assert.NotEmpty(exception.Message);
     Assert.Equal(COR_E_FIELDACCESS, exception.HResult);
 }
예제 #4
0
        public void Verify_FieldAccessException_IsCaaught()
        {
            FieldAccessException ex = new FieldAccessException();

            Router.TryHandleException(ex);
        }