예제 #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);
		}
예제 #2
0
		public void MapModelToEntity()
		{
			var mapper = new DALVPersonMapper();
			ApiVPersonServerRequestModel model = new ApiVPersonServerRequestModel();
			model.SetProperties("A");
			VPerson response = mapper.MapModelToEntity(1, model);

			response.PersonName.Should().Be("A");
		}
예제 #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");
		}