Inheritance: MemberAccessException
Exemplo n.º 1
0
 public static void Ctor_String()
 {
     string message = "Created MethodAccessException";
     var exception = new MethodAccessException(message);
     Assert.Equal(message, exception.Message);
     Assert.Equal(COR_E_METHODACCESS, exception.HResult);
 }
Exemplo n.º 2
0
 public static void Ctor_String_Exception()
 {
     string message = "Created MethodAccessException";
     var innerException = new Exception("Created inner exception");
     var exception = new MethodAccessException(message, innerException);
     Assert.Equal(message, exception.Message);
     Assert.Equal(COR_E_METHODACCESS, exception.HResult);
     Assert.Same(innerException, exception.InnerException);
     Assert.Equal(innerException.HResult, exception.InnerException.HResult);
 }
Exemplo n.º 3
0
 public static void Ctor_Empty()
 {
     var exception = new MethodAccessException();
     Assert.NotEmpty(exception.Message);
     Assert.Equal(COR_E_METHODACCESS, exception.HResult);
 }