Ejemplo n.º 1
0
        public ActionResult Edit(int ID, string name, string last1, string last2)
        {
            var objEdit = new OwnerViewModel
            {
                ID    = ID,
                Name  = name,
                Last1 = last1,
                Last2 = last2
            };

            var model = Service.Edit(objEdit);

            return(null);
        }
Ejemplo n.º 2
0
        public void Edit_MethodIsRun_RunsOkVoid()  /// Tests the Edit method is run
        {
            //arrange
            Owner owner = new Owner();

            mockOwnerRepository.Setup(repo => repo.Edit(It.IsAny <Owner>()));

            //act
            OwnerEditViewModel ownerVm = new OwnerEditViewModel( );

            ownerVm.Owner = new OwnerViewModel {
                OwnerId = 1, EmailAddress = "", PhoneNumber = "", Title = "A", FullName = "RG", PropertiesOwned = 1
            };

            service.Edit(ownerVm);

            //assert
            mockOwnerRepository.VerifyAll();
        }