Exemplo n.º 1
0
        public UserLogin GetUserLoginInfo(string loginName)
        {
            UserLogin login = null;

            BankAccount dbBankAcct = _lib.GetBankAccountByLoginName(loginName);

            if (dbBankAcct != null)
            {
                login = new UserLogin()
                {
                    BankAccountId = dbBankAcct.Id,
                    LoginName     = dbBankAcct.LoginName,
                    Password      = dbBankAcct.Password,
                    AccountNumber = dbBankAcct.AccountNumber,
                    CreatedDate   = dbBankAcct.CreatedDate
                };
            }

            return(login);
        }
        public void TestGetBankAccountByLoginName()
        {
            string expectedAccountNumber = "20191000100001";
            string expectedLoginName     = "testuser1";

            BankAccount acct = _dataLib.GetBankAccountByLoginName(expectedLoginName);

            Assert.IsNotNull(acct);
            Assert.AreEqual(expectedLoginName, acct.LoginName);
            Assert.AreEqual(expectedAccountNumber, acct.AccountNumber);
        }