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

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

            response.Name.Should().Be("A");
        }
Esempio n. 2
0
        public void MapBOToModel()
        {
            var            mapper = new BOLOrganizationMapper();
            BOOrganization bo     = new BOOrganization();

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

            response.Id.Should().Be(1);
            response.Name.Should().Be("A");
        }
Esempio n. 3
0
        public void MapEFToBO()
        {
            var          mapper = new DALOrganizationMapper();
            Organization entity = new Organization();

            entity.SetProperties(1, "A");

            BOOrganization response = mapper.MapEFToBO(entity);

            response.Id.Should().Be(1);
            response.Name.Should().Be("A");
        }
Esempio n. 4
0
        public void MapBOToEF()
        {
            var mapper = new DALOrganizationMapper();
            var bo     = new BOOrganization();

            bo.SetProperties(1, "A");

            Organization response = mapper.MapBOToEF(bo);

            response.Id.Should().Be(1);
            response.Name.Should().Be("A");
        }
Esempio n. 5
0
        public void MapBOToModelList()
        {
            var            mapper = new BOLOrganizationMapper();
            BOOrganization bo     = new BOOrganization();

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

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