Пример #1
0
        public void MapEntityToModel()
        {
            var             mapper = new DALRowVersionCheckMapper();
            RowVersionCheck item   = new RowVersionCheck();

            item.SetProperties(1, "A", Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"));
            ApiRowVersionCheckServerResponseModel response = mapper.MapEntityToModel(item);

            response.Id.Should().Be(1);
            response.Name.Should().Be("A");
            response.RowVersion.Should().Be(Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"));
        }
Пример #2
0
        public void MapEntityToModelList()
        {
            var             mapper = new DALRowVersionCheckMapper();
            RowVersionCheck item   = new RowVersionCheck();

            item.SetProperties(1, "A", Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"));
            List <ApiRowVersionCheckServerResponseModel> response = mapper.MapEntityToModel(new List <RowVersionCheck>()
            {
                { item }
            });

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