Beispiel #1
0
        public void ShouldBeAbleToAuthenticate()
        {
            var _strUser = "******";
            var _strPass = "******";

            var _objDao = new LoginDAO(mock.Object);

            Assert.AreEqual(_objDao.Auth(_strUser, _strPass).Id, 1);
        }
Beispiel #2
0
        public void ShouldThrowExceptionIfUserDoesNotExists()
        {
            var _strUser = "******";
            var _strPass = "******";

            var _objDao = new LoginDAO(mock.Object);

            Assert.ThrowsException <Exception>(() =>
            {
                _objDao.Auth(_strUser, _strPass);
            });
        }
Beispiel #3
0
        public void ShouldThrowExceptionIfAuthenticationFails()
        {
            var _strUser = "******";
            var _strPass = "******";

            var _objDao = new LoginDAO(mock.Object);

            Assert.ThrowsException <Exception>(() =>
            {
                _objDao.Auth(_strUser, _strPass);
            });
        }