public void UserDetailsById() { var Input = GetInPut(); IRepository <UserDetails> userRepository = new Repository <UserDetails>(); UserDetailsBL df = new UserDetailsBL(userRepository); var UserDetailList = df.GetAllUserDetailsRecord(); var qq = UserDetailList.Where(tt => tt.EmployeeId == Input.EmployeeId).FirstOrDefault(); if (qq != null) { if (qq.EmployeeId == Input.EmployeeId) { Assert.Pass(); } else { Assert.Fail(); } } else { Assert.Fail(); } }
public void DeleteUserDetail() { //int intUserId = 2; var Input = GetInPut(); IRepository <UserDetails> userRepository = new Repository <UserDetails>(); UserDetailsBL UDBL = new UserDetailsBL(userRepository); var UserDetailList = UDBL.GetAllUserDetailsRecord(); var qq = UserDetailList.Where(tt => tt.EmployeeId == Input.EmployeeId).FirstOrDefault(); UDBL.DeleteUserDetailsRecordByUserId(qq.UserId); var UserDetailList1 = UDBL.GetAllUserDetailsRecord(); var Ul = UserDetailList1.Where(tt => tt.EmployeeId == Input.EmployeeId).FirstOrDefault(); if (Ul == null) { if (qq != Ul) { Assert.Pass(); } else { Assert.Fail(); } } else { Assert.Fail(); } }
public void BenchMarkGetAllUserDetails() { IEnumerable <UserDetailsViewModel> userList; IRepository <UserDetails> userRepository = new Repository <UserDetails>(); UserDetailsBL df = new UserDetailsBL(userRepository); userList = df.GetAllUserDetailsRecord(); //Console.WriteLine(tt.ToString()); }
public void BenchMarkUserDetailDeleteById() { IRepository <UserDetails> userRepository = new Repository <UserDetails>(); UserDetailsBL df = new UserDetailsBL(userRepository); if (!string.IsNullOrWhiteSpace(df.GetUserDetailsRecordByUSerId(deleteUserId).FirstName)) { df.DeleteUserDetailsRecordByUserId(deleteUserId); } }
public void BenchMarkCreateUserDetail() { UserDetailsViewModel Input = new UserDetailsViewModel(); Input.FirstName = "TestUserFirstName"; Input.LastName = "TestUserLastName"; Input.EmployeeId = EmployeeId + 5; IRepository <UserDetails> userRepository = new Repository <UserDetails>(); UserDetailsBL df = new UserDetailsBL(userRepository); if (Input != null) { df.SaveUserDetailsRecord(Input); } }
public void GetAllUserDetails() { //int intUserId = 2; IRepository <UserDetails> userRepository = new Repository <UserDetails>(); UserDetailsBL df = new UserDetailsBL(userRepository); var UserDetailList = df.GetAllUserDetailsRecord(); if (UserDetailList != null && UserDetailList.Count() > 0) { Assert.Pass(); } else { Assert.Fail(); } }
public void CreateUser() { IRepository <UserDetails> userRepository = new Repository <UserDetails>(); UserDetailsBL df = new UserDetailsBL(userRepository); var Input = GetInPut(); if (Input != null) { df.SaveUserDetailsRecord(Input); } var UserDetailList = df.GetAllUserDetailsRecord(); var qq = UserDetailList.Where(tt => tt.EmployeeId == Input.EmployeeId); if (qq != null) { Assert.Pass(); } else { Assert.Fail(); } }
public void BenchMarkUserDetailsById() { IRepository <UserDetails> userRepository = new Repository <UserDetails>(); UserDetailsBL df = new UserDetailsBL(userRepository); var tt = df.GetUserDetailsRecordByUSerId(fetchUserId); }