Esempio n. 1
0
        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();
            }
        }
Esempio n. 2
0
        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();
            }
        }
Esempio n. 3
0
        public void BenchMarkGetAllUserDetails()
        {
            IEnumerable <UserDetailsViewModel> userList;
            IRepository <UserDetails>          userRepository = new Repository <UserDetails>();
            UserDetailsBL df = new UserDetailsBL(userRepository);

            userList = df.GetAllUserDetailsRecord();
            //Console.WriteLine(tt.ToString());
        }
Esempio n. 4
0
        public void BenchMarkUserDetailDeleteById()
        {
            IRepository <UserDetails> userRepository = new Repository <UserDetails>();
            UserDetailsBL             df             = new UserDetailsBL(userRepository);

            if (!string.IsNullOrWhiteSpace(df.GetUserDetailsRecordByUSerId(deleteUserId).FirstName))
            {
                df.DeleteUserDetailsRecordByUserId(deleteUserId);
            }
        }
Esempio n. 5
0
        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);
            }
        }
Esempio n. 6
0
        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();
            }
        }
Esempio n. 7
0
        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();
            }
        }
Esempio n. 8
0
 public void BenchMarkUserDetailsById()
 {
     IRepository <UserDetails> userRepository = new Repository <UserDetails>();
     UserDetailsBL             df             = new UserDetailsBL(userRepository);
     var tt = df.GetUserDetailsRecordByUSerId(fetchUserId);
 }