Exemple #1
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));
        }
Exemple #2
0
        public void DeleteBankManager()

        {
            BankManagerDao bankManagerDAO = new BankManagerDao();

            BankManagerDto bankManagerDto = new BankManagerDto()

            {
                FirstName = "Serik",

                LastName = "Shulembekov",

                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);

            bankManagerDAO.Remove(bankManagerDto.Id);

            Assert.IsNull(bankManagerDAO.Read(bankManagerDto.Id));
        }
        public void BankManagerDao_Create()
        {
            BankManagerDto dto = new BankManagerDto("asd", "asd", "asd", "asd", "asd");

            dto.Id = "1";
            BankManagerDao dao = new BankManagerDao();

            string result = dao.Create(dto);

            Assert.IsTrue(dto.Id == result);
        }
Exemple #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");
        }