Beispiel #1
0
        public void MapEFToBOList()
        {
            var    mapper = new DALStudioMapper();
            Studio entity = new Studio();

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

            List <BOStudio> response = mapper.MapEFToBO(new List <Studio>()
            {
                entity
            });

            response.Count.Should().Be(1);
        }
Beispiel #2
0
        public void MapEFToBO()
        {
            var    mapper = new DALStudioMapper();
            Studio entity = new Studio();

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

            BOStudio response = mapper.MapEFToBO(entity);

            response.Address1.Should().Be("A");
            response.Address2.Should().Be("A");
            response.City.Should().Be("A");
            response.Id.Should().Be(1);
            response.Name.Should().Be("A");
            response.Province.Should().Be("A");
            response.Website.Should().Be("A");
            response.Zip.Should().Be("A");
        }
Beispiel #3
0
        public void MapBOToEF()
        {
            var mapper = new DALStudioMapper();
            var bo     = new BOStudio();

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

            Studio response = mapper.MapBOToEF(bo);

            response.Address1.Should().Be("A");
            response.Address2.Should().Be("A");
            response.City.Should().Be("A");
            response.Id.Should().Be(1);
            response.Name.Should().Be("A");
            response.Province.Should().Be("A");
            response.Website.Should().Be("A");
            response.Zip.Should().Be("A");
        }