public void MapModelToEntity() { var mapper = new DALOrganizationMapper(); ApiOrganizationServerRequestModel model = new ApiOrganizationServerRequestModel(); model.SetProperties("A"); Organization response = mapper.MapModelToEntity(1, model); response.Name.Should().Be("A"); }
public void MapEntityToModel() { var mapper = new DALOrganizationMapper(); Organization item = new Organization(); item.SetProperties(1, "A"); ApiOrganizationServerResponseModel response = mapper.MapEntityToModel(item); response.Id.Should().Be(1); response.Name.Should().Be("A"); }
public void MapEntityToModelList() { var mapper = new DALOrganizationMapper(); Organization item = new Organization(); item.SetProperties(1, "A"); List <ApiOrganizationServerResponseModel> response = mapper.MapEntityToModel(new List <Organization>() { { item } }); response.Count.Should().Be(1); }