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)); }
public void BankClientDao_Create() { BankClientDto dto = new BankClientDto("qwert", "qwert", "qwert", "qwert", "qwert"); dto.Id = "1"; BankClientDao dao = new BankClientDao(); string result = dao.Create(dto); Assert.IsTrue(dto.Id == result); }
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)); }
private void button1_Click(object sender, EventArgs e) { BankClientDao bankClientDao = new BankClientDao(); bankClientDao.Create(new BankClientDto() { Id = "test2", FirstName = "test2", LastName = "test2", AccountNumber = "test2", Email = "test2", PasswordHash = "test2", Name = "test2" }); }
public void BankClientDao_Create() { // Arrange BankClientDto bankClientDto = new BankClientDto("Test", "Test", "Test", "Test", "Test"); bankClientDto.Id = "2222"; BankClientDao bankClientDao = new BankClientDao(); // Act string result = bankClientDao.Create(bankClientDto); // Assert Assert.IsTrue(bankClientDto.Id == result); }
public void UpdateBankClient() { BankClientDao bankManagerDAO = new BankClientDao(); BankClientDto bankManagerDto = new BankClientDto() { FirstName = "Arecr", LastName = "Frers", 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); bankManagerDto.LastName = "Reded"; string result = bankManagerDAO.Update(bankManagerDto); Assert.IsTrue(result == "1"); }