Esempio n. 1
0
        public void MapModelToEntity()
        {
            var mapper = new DALPostHistoryTypeMapper();
            ApiPostHistoryTypeServerRequestModel model = new ApiPostHistoryTypeServerRequestModel();

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

            response.RwType.Should().Be("A");
        }
Esempio n. 2
0
        public void MapEntityToModel()
        {
            var             mapper = new DALPostHistoryTypeMapper();
            PostHistoryType item   = new PostHistoryType();

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

            response.Id.Should().Be(1);
            response.RwType.Should().Be("A");
        }
Esempio n. 3
0
        public void MapEntityToModelList()
        {
            var             mapper = new DALPostHistoryTypeMapper();
            PostHistoryType item   = new PostHistoryType();

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

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