public void MapEntityToModelList() { var mapper = new DALCallPersonMapper(); CallPerson item = new CallPerson(); item.SetProperties(1, "A", 1, 1); List <ApiCallPersonServerResponseModel> response = mapper.MapEntityToModel(new List <CallPerson>() { { item } }); response.Count.Should().Be(1); }
public void MapEntityToModel() { var mapper = new DALCallPersonMapper(); CallPerson item = new CallPerson(); item.SetProperties(1, "A", 1, 1); ApiCallPersonServerResponseModel response = mapper.MapEntityToModel(item); response.Id.Should().Be(1); response.Note.Should().Be("A"); response.PersonId.Should().Be(1); response.PersonTypeId.Should().Be(1); }
public virtual CallPerson MapModelToEntity( int id, ApiCallPersonServerRequestModel model ) { CallPerson item = new CallPerson(); item.SetProperties( id, model.Note, model.PersonId, model.PersonTypeId); return(item); }