Пример #1
0
        public void MapModelToEntity()
        {
            var mapper = new DALColumnSameAsFKTableMapper();
            ApiColumnSameAsFKTableServerRequestModel model = new ApiColumnSameAsFKTableServerRequestModel();

            model.SetProperties(1, 1);
            ColumnSameAsFKTable response = mapper.MapModelToEntity(1, model);

            response.Person.Should().Be(1);
            response.PersonId.Should().Be(1);
        }
Пример #2
0
        public void MapEntityToModel()
        {
            var mapper = new DALColumnSameAsFKTableMapper();
            ColumnSameAsFKTable item = new ColumnSameAsFKTable();

            item.SetProperties(1, 1, 1);
            ApiColumnSameAsFKTableServerResponseModel response = mapper.MapEntityToModel(item);

            response.Id.Should().Be(1);
            response.Person.Should().Be(1);
            response.PersonId.Should().Be(1);
        }
Пример #3
0
        public void MapEntityToModelList()
        {
            var mapper = new DALColumnSameAsFKTableMapper();
            ColumnSameAsFKTable item = new ColumnSameAsFKTable();

            item.SetProperties(1, 1, 1);
            List <ApiColumnSameAsFKTableServerResponseModel> response = mapper.MapEntityToModel(new List <ColumnSameAsFKTable>()
            {
                { item }
            });

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