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); }
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); }
public static void Ctor_Empty() { var exception = new FieldAccessException(); Assert.NotEmpty(exception.Message); Assert.Equal(COR_E_FIELDACCESS, exception.HResult); }
public void Verify_FieldAccessException_IsCaaught() { FieldAccessException ex = new FieldAccessException(); Router.TryHandleException(ex); }