예제 #1
0
        public void InsertUserProfileShouldNotFail()
        {
            var failed        = userProfileServices.Insert(userProfile);
            var dbUserProfile = userProfileServices.GetByID(userProfile.Id);

            Assert.AreEqual(userProfile, dbUserProfile);
        }
예제 #2
0
        public ActionResult Edit(string id)
        {
            var post = userProfileService.GetByID(id);

            ViewBag.BranchList = new SelectList(branchService.GetDropDown(), "Value", "Text", post.BranchId);

            return(View(post));
        }
예제 #3
0
        public void GetByID_EntityNotFound()
        {
            this.mockRepository.Setup(x => x.GetByID(It.IsAny <object>()));

            var services = new UserProfileService(this.mockRepository.Object);

            services.GetByID(0).Should().BeNull();
        }