public void PassesTheErrorOnWhenNotKnown() { var rasGetErrorString = new Mock <IRasGetErrorString>(); var target = new RasDialCallbackExceptionPolicy(rasGetErrorString.Object); var result = target.Create(-1); Assert.IsInstanceOf <Win32Exception>(result); }
public void ShouldReturnTheMessageFromEapAsExpected() { var rasGetErrorString = new Mock <IRasGetErrorString>(); var target = new RasDialCallbackExceptionPolicy(rasGetErrorString.Object); var result = target.Create(EAP_E_USER_NAME_PASSWORD_REJECTED) as EapException; Assert.IsNotNull(result); Assert.AreEqual("Authenticator rejected user credentials for authentication.", result.Message); }