Beispiel #1
0
        public void DeleteBankClient()
        {
            BankClientDao bankManagerDAO = new BankClientDao();

            BankClientDto bankManagerDto = new BankClientDto()

            {
                FirstName = "Serik",

                LastName = "Shulembekov",

                Email = "*****@*****.**",

                CreatedTime = DateTime.Now,

                ApplicationClientType = ApplicationClientType.BankClient,

                EntityStatus = EntityStatusType.IsActive,

                PasswordHash = "123",
            };

            bankManagerDto.Id = ApplicationUserIdGenerator.GenerateUniqueId(

                bankManagerDto.FirstName, bankManagerDto.LastName,

                bankManagerDto.ApplicationClientType);

            bankManagerDAO.Create(bankManagerDto);

            bankManagerDAO.Remove(bankManagerDto.Id);

            Assert.IsNull(bankManagerDAO.Read(bankManagerDto.Id));
        }
Beispiel #2
0
        public void CreateBankManager()

        {
            BankManagerDao bankManagerDAO = new BankManagerDao();

            BankManagerDto bankManagerDto = new BankManagerDto()

            {
                FirstName = "Aibek",

                LastName = "Shulembekov",

                Email = "*****@*****.**",

                CreatedTime = DateTime.Now,

                ApplicationClientType = ApplicationClientType.BankManager,

                EntityStatus = EntityStatusType.IsActive,

                PasswordHash = "123",
            };

            bankManagerDto.Id = ApplicationUserIdGenerator.GenerateUniqueId(

                bankManagerDto.FirstName, bankManagerDto.LastName,

                bankManagerDto.ApplicationClientType);

            Assert.IsTrue(bankManagerDto.Id == bankManagerDAO.Create(bankManagerDto));
        }
Beispiel #3
0
        public string RegisterNewBankClient(BankClientDto bankClientDto)
        {
            bankClientDto.Id = ApplicationUserIdGenerator.GenerateUniqueId(
                bankClientDto.FirstName,
                bankClientDto.LastName,
                ApplicationClientType.BankClient);

            bankClientDto.PasswordHash =
                PasswordHashGenerator.GetMd5Hash(bankClientDto.PasswordHash);

            return(_bankClientDao.Create(bankClientDto));
        }
Beispiel #4
0
        public void UpdateBankManager()

        {
            BankManagerDao bankManagerDAO = new BankManagerDao();

            BankManagerDto bankManagerDto = new BankManagerDto()

            {
                FirstName = "Arecr",

                LastName = "Frers",

                Email = "*****@*****.**",

                CreatedTime = DateTime.Now,

                ApplicationClientType = ApplicationClientType.BankManager,

                EntityStatus = EntityStatusType.IsActive,

                PasswordHash = "123",
            };

            bankManagerDto.Id = ApplicationUserIdGenerator.GenerateUniqueId(

                bankManagerDto.FirstName, bankManagerDto.LastName,

                bankManagerDto.ApplicationClientType);

            bankManagerDAO.Create(bankManagerDto);

            bankManagerDto.LastName = "Reded";

            string result = bankManagerDAO.Update(bankManagerDto);

            Assert.IsTrue(result == "1");
        }