Esempio n. 1
0
		public void MapEntityToModelList()
		{
			var mapper = new DALVPersonMapper();
			VPerson item = new VPerson();
			item.SetProperties(1, "A");
			List<ApiVPersonServerResponseModel> response = mapper.MapEntityToModel(new List<VPerson>() { { item} });

			response.Count.Should().Be(1);
		}
        public virtual VPerson MapBOToEF(
            BOVPerson bo)
        {
            VPerson efVPerson = new VPerson();

            efVPerson.SetProperties(
                bo.PersonId,
                bo.PersonName);
            return(efVPerson);
        }
Esempio n. 3
0
		public void MapEntityToModel()
		{
			var mapper = new DALVPersonMapper();
			VPerson item = new VPerson();
			item.SetProperties(1, "A");
			ApiVPersonServerResponseModel response = mapper.MapEntityToModel(item);

			response.PersonId.Should().Be(1);
			response.PersonName.Should().Be("A");
		}
Esempio n. 4
0
        public void MapEFToBO()
        {
            var     mapper = new DALVPersonMapper();
            VPerson entity = new VPerson();

            entity.SetProperties(1, "A");

            BOVPerson response = mapper.MapEFToBO(entity);

            response.PersonId.Should().Be(1);
            response.PersonName.Should().Be("A");
        }
Esempio n. 5
0
        public virtual VPerson MapModelToEntity(
            int personId,
            ApiVPersonServerRequestModel model
            )
        {
            VPerson item = new VPerson();

            item.SetProperties(
                personId,
                model.PersonName);
            return(item);
        }
Esempio n. 6
0
        public void MapEFToBOList()
        {
            var     mapper = new DALVPersonMapper();
            VPerson entity = new VPerson();

            entity.SetProperties(1, "A");

            List <BOVPerson> response = mapper.MapEFToBO(new List <VPerson>()
            {
                entity
            });

            response.Count.Should().Be(1);
        }