Ejemplo n.º 1
0
        public void PassesTheErrorOnWhenNotKnown()
        {
            var rasGetErrorString = new Mock <IRasGetErrorString>();

            var target = new RasDialCallbackExceptionPolicy(rasGetErrorString.Object);
            var result = target.Create(-1);

            Assert.IsInstanceOf <Win32Exception>(result);
        }
Ejemplo n.º 2
0
        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);
        }