Beispiel #1
0
        public void MapBOToModelList()
        {
            var    mapper = new BOLTagsMapper();
            BOTags bo     = new BOTags();

            bo.SetProperties(1, 1, 1, "A", 1);
            List <ApiTagsResponseModel> response = mapper.MapBOToModel(new List <BOTags>()
            {
                { bo }
            });

            response.Count.Should().Be(1);
        }
Beispiel #2
0
        public void MapModelToBO()
        {
            var mapper = new BOLTagsMapper();
            ApiTagsRequestModel model = new ApiTagsRequestModel();

            model.SetProperties(1, 1, "A", 1);
            BOTags response = mapper.MapModelToBO(1, model);

            response.Count.Should().Be(1);
            response.ExcerptPostId.Should().Be(1);
            response.TagName.Should().Be("A");
            response.WikiPostId.Should().Be(1);
        }
Beispiel #3
0
        public void MapBOToModel()
        {
            var    mapper = new BOLTagsMapper();
            BOTags bo     = new BOTags();

            bo.SetProperties(1, 1, 1, "A", 1);
            ApiTagsResponseModel response = mapper.MapBOToModel(bo);

            response.Count.Should().Be(1);
            response.ExcerptPostId.Should().Be(1);
            response.Id.Should().Be(1);
            response.TagName.Should().Be("A");
            response.WikiPostId.Should().Be(1);
        }
Beispiel #4
0
        public void MapEFToBO()
        {
            var  mapper = new DALTagsMapper();
            Tags entity = new Tags();

            entity.SetProperties(1, 1, 1, "A", 1);

            BOTags response = mapper.MapEFToBO(entity);

            response.Count.Should().Be(1);
            response.ExcerptPostId.Should().Be(1);
            response.Id.Should().Be(1);
            response.TagName.Should().Be("A");
            response.WikiPostId.Should().Be(1);
        }
Beispiel #5
0
        public void MapBOToEF()
        {
            var mapper = new DALTagsMapper();
            var bo     = new BOTags();

            bo.SetProperties(1, 1, 1, "A", 1);

            Tags response = mapper.MapBOToEF(bo);

            response.Count.Should().Be(1);
            response.ExcerptPostId.Should().Be(1);
            response.Id.Should().Be(1);
            response.TagName.Should().Be("A");
            response.WikiPostId.Should().Be(1);
        }