public void TestDeletePerson()
        {
            Mock <IPersonDataAccess> personDataAccess = new Mock <IPersonDataAccess>();

            personDataAccess.Setup(x => x.Delete(It.IsAny <PersonIdentityModel>()));


            var deleteService = new PersonDeleteService(personDataAccess.Object);

            deleteService.DeletePerson(new PersonIdentityModel(1));


            personDataAccess.Verify(x => x.Delete(It.IsAny <PersonIdentityModel>()), Times.Once());
        }
Example #2
0
        public void DeletePerson(int id)
        {
            var identityModel = new PersonIdentityModel(id);

            PersonDeleteService.DeletePerson(identityModel);
        }