Esempio n. 1
0
        public void MapModelToBO()
        {
            var mapper = new BOLIllustrationMapper();
            ApiIllustrationRequestModel model = new ApiIllustrationRequestModel();

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

            response.Diagram.Should().Be("A");
            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
        }
Esempio n. 2
0
        public void MapBOToModel()
        {
            var            mapper = new BOLIllustrationMapper();
            BOIllustration bo     = new BOIllustration();

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

            response.Diagram.Should().Be("A");
            response.IllustrationID.Should().Be(1);
            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
        }
Esempio n. 3
0
        public void MapBOToModelList()
        {
            var            mapper = new BOLIllustrationMapper();
            BOIllustration bo     = new BOIllustration();

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

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