コード例 #1
0
        public void MapModelToBO()
        {
            var mapper = new BOLProductModelIllustrationMapper();
            ApiProductModelIllustrationRequestModel model = new ApiProductModelIllustrationRequestModel();

            model.SetProperties(1, DateTime.Parse("1/1/1987 12:00:00 AM"));
            BOProductModelIllustration response = mapper.MapModelToBO(1, model);

            response.IllustrationID.Should().Be(1);
            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
        }
コード例 #2
0
        public void MapBOToModel()
        {
            var mapper = new BOLProductModelIllustrationMapper();
            BOProductModelIllustration bo = new BOProductModelIllustration();

            bo.SetProperties(1, 1, DateTime.Parse("1/1/1987 12:00:00 AM"));
            ApiProductModelIllustrationResponseModel response = mapper.MapBOToModel(bo);

            response.IllustrationID.Should().Be(1);
            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.ProductModelID.Should().Be(1);
        }
コード例 #3
0
        public void MapBOToModelList()
        {
            var mapper = new BOLProductModelIllustrationMapper();
            BOProductModelIllustration bo = new BOProductModelIllustration();

            bo.SetProperties(1, 1, DateTime.Parse("1/1/1987 12:00:00 AM"));
            List <ApiProductModelIllustrationResponseModel> response = mapper.MapBOToModel(new List <BOProductModelIllustration>()
            {
                { bo }
            });

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