Ejemplo n.º 1
0
        public void MapModelToEntity()
        {
            var mapper = new DALLocationMapper();
            ApiLocationServerRequestModel model = new ApiLocationServerRequestModel();

            model.SetProperties(1, 1, "A");
            Location response = mapper.MapModelToEntity(1, model);

            response.GpsLat.Should().Be(1);
            response.GpsLong.Should().Be(1);
            response.LocationName.Should().Be("A");
        }
Ejemplo n.º 2
0
        public void MapEntityToModelList()
        {
            var      mapper = new DALLocationMapper();
            Location item   = new Location();

            item.SetProperties(1, 1, 1, "A");
            List <ApiLocationServerResponseModel> response = mapper.MapEntityToModel(new List <Location>()
            {
                { item }
            });

            response.Count.Should().Be(1);
        }
Ejemplo n.º 3
0
        public void MapEntityToModel()
        {
            var      mapper = new DALLocationMapper();
            Location item   = new Location();

            item.SetProperties(1, 1, 1, "A");
            ApiLocationServerResponseModel response = mapper.MapEntityToModel(item);

            response.GpsLat.Should().Be(1);
            response.GpsLong.Should().Be(1);
            response.LocationId.Should().Be(1);
            response.LocationName.Should().Be("A");
        }