Beispiel #1
0
        public void MapModelToBO()
        {
            var mapper = new BOLLinkTypeMapper();
            ApiLinkTypeRequestModel model = new ApiLinkTypeRequestModel();

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

            response.Type.Should().Be("A");
        }
Beispiel #2
0
        public void MapBOToModel()
        {
            var        mapper = new BOLLinkTypeMapper();
            BOLinkType bo     = new BOLinkType();

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

            response.Id.Should().Be(1);
            response.Type.Should().Be("A");
        }
        public void MapEFToBO()
        {
            var      mapper = new DALLinkTypeMapper();
            LinkType entity = new LinkType();

            entity.SetProperties(1, "A");

            BOLinkType response = mapper.MapEFToBO(entity);

            response.Id.Should().Be(1);
            response.Type.Should().Be("A");
        }
        public void MapBOToEF()
        {
            var mapper = new DALLinkTypeMapper();
            var bo     = new BOLinkType();

            bo.SetProperties(1, "A");

            LinkType response = mapper.MapBOToEF(bo);

            response.Id.Should().Be(1);
            response.Type.Should().Be("A");
        }
Beispiel #5
0
        public void MapBOToModelList()
        {
            var        mapper = new BOLLinkTypeMapper();
            BOLinkType bo     = new BOLinkType();

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

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