Exemplo n.º 1
0
        public void InsertUserProfileShouldNotFail()
        {
            var failed        = userProfileServices.Insert(userProfile);
            var dbUserProfile = userProfileServices.GetByID(userProfile.Id);

            Assert.AreEqual(userProfile, dbUserProfile);
        }
Exemplo n.º 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));
        }
Exemplo n.º 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();
        }