public void MapBOToModelList()
        {
            var mapper          = new BOLActionTemplateMapper();
            BOActionTemplate bo = new BOActionTemplate();

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

            response.Count.Should().Be(1);
        }
        public void MapModelToBO()
        {
            var mapper = new BOLActionTemplateMapper();
            ApiActionTemplateRequestModel model = new ApiActionTemplateRequestModel();

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

            response.ActionType.Should().Be("A");
            response.CommunityActionTemplateId.Should().Be("A");
            response.JSON.Should().Be("A");
            response.Name.Should().Be("A");
            response.Version.Should().Be(1);
        }
        public void MapBOToModel()
        {
            var mapper          = new BOLActionTemplateMapper();
            BOActionTemplate bo = new BOActionTemplate();

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

            response.ActionType.Should().Be("A");
            response.CommunityActionTemplateId.Should().Be("A");
            response.Id.Should().Be("A");
            response.JSON.Should().Be("A");
            response.Name.Should().Be("A");
            response.Version.Should().Be(1);
        }
Example #4
0
        public void MapEFToBO()
        {
            var            mapper = new DALActionTemplateMapper();
            ActionTemplate entity = new ActionTemplate();

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

            BOActionTemplate response = mapper.MapEFToBO(entity);

            response.ActionType.Should().Be("A");
            response.CommunityActionTemplateId.Should().Be("A");
            response.Id.Should().Be("A");
            response.JSON.Should().Be("A");
            response.Name.Should().Be("A");
            response.Version.Should().Be(1);
        }
Example #5
0
        public void MapBOToEF()
        {
            var mapper = new DALActionTemplateMapper();
            var bo     = new BOActionTemplate();

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

            ActionTemplate response = mapper.MapBOToEF(bo);

            response.ActionType.Should().Be("A");
            response.CommunityActionTemplateId.Should().Be("A");
            response.Id.Should().Be("A");
            response.JSON.Should().Be("A");
            response.Name.Should().Be("A");
            response.Version.Should().Be(1);
        }