Пример #1
0
        public void ChangeProfilePicUrlForCarlosWithUrl()
        {
            //Arrange
            var expectedResult = "newpicture.jpg";

            //Act
            service.ChangeProfilePicUrl("CarlosUserID", expectedResult);
            var result = (from p in mockDb.profiles
                          where p.userID == "CarlosUserID"
                          select p).SingleOrDefault();

            //Assert
            Assert.AreEqual("newpicture.jpg", result.profilePicUrl);
        }
Пример #2
0
        public ActionResult ChangeProfilePic(Profile profile)
        {
            var service = new ProfileService(null);

            service.ChangeProfilePicUrl(User.Identity.GetUserId(), profile.profilePicUrl);

            return(RedirectToAction("Index", new { Message = ManageMessageId.ChangeProfilePicSuccess }));
        }