Beispiel #1
0
        public void EmailNOK()
        {
            #region - code -

            var network = new LocalNetwork()
            {
                sqlServer = connStr
            };
            var auth = new DtoAuthenticatedUser();
            var repo = new FakeRepo_User();

            var tu_obj = new DtoLoginInformation
            {
                email    = Base_Ut_user.stEmail + "....",
                password = Base_Ut_user.stPassword
            };

            var srv = new SrvAuthenticateV1(repo);

            if (srv.Exec(network, tu_obj, ref auth))
            {
                Assert.Fail();
            }

            #endregion
        }
Beispiel #2
0
        public void EmailNotExists()
        {
            #region - code -

            var network = new LocalNetwork()
            {
                sqlServer = connStr
            };
            var repo = new FakeRepo_User();
            var srv  = new SrvPasswordRecoveryV1(repo)
            {
                _sendEmail = false
            };

            if (srv.Exec(network, new DtoPasswordRecovery
            {
                email = "*****@*****.**",
                _language = 0
            }))
            {
                Assert.Fail();
            }

            #endregion
        }
Beispiel #3
0
        public void OK()
        {
            #region - code -

            var network = new LocalNetwork()
            {
                sqlServer = connStr
            };
            var repo = new FakeRepo_User();
            var srv  = new SrvPasswordRecoveryV1(repo)
            {
                _sendEmail = false
            };

            if (!srv.Exec(network, new DtoPasswordRecovery
            {
                email = new UTstUserBase().Base_Ut_user.stEmail,
                _language = 0
            }))
            {
                Assert.Fail();
            }

            #endregion
        }
Beispiel #4
0
        public void OK()
        {
            #region - code -

            var network = new LocalNetwork()
            {
                sqlServer = connStr
            };
            var repo = new FakeRepo_User();

            var srv = new SrvOnboardingV1(repo)
            {
                _sendEmail = false
            };

            if (!srv.Exec(network, new DtoOnboarding
            {
                sEmail = "*****@*****.**",
                sID = "102030405060",
                sName = "One",
                sPass = "******",
                _language = 0
            }))
            {
                Assert.Fail();
            }

            #endregion
        }
Beispiel #5
0
        public void SidEmpty()
        {
            #region - code -

            var network = new LocalNetwork()
            {
                sqlServer = connStr
            };
            var repo = new FakeRepo_User();
            var srv  = new SrvResendTokenV1(repo)
            {
                _sendEmail = true
            };

            if (srv.Exec(network, new DtoResendToken
            {
                sID = null,
                _language = 0
            }))
            {
                Assert.Fail();
            }

            #endregion
        }
Beispiel #6
0
        public void UserCantExist()
        {
            #region - code -

            var network = new LocalNetwork()
            {
                sqlServer = connStr
            };
            var repo = new FakeRepo_User();

            var srv = new SrvCheckNewSocial_IDV1(repo);

            if (srv.Exec(network, new DtoCheckNewSocial_ID
            {
                sID = "1",
                _language = 0
            }))
            {
                Assert.Fail();
            }

            #endregion
        }