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

            bo.SetProperties(1, 1, DateTime.Parse("1/1/1987 12:00:00 AM"), 1, Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"));
            List <ApiBusinessEntityContactResponseModel> response = mapper.MapBOToModel(new List <BOBusinessEntityContact>()
            {
                { bo }
            });

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

            model.SetProperties(1, DateTime.Parse("1/1/1987 12:00:00 AM"), 1, Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"));
            BOBusinessEntityContact response = mapper.MapModelToBO(1, model);

            response.ContactTypeID.Should().Be(1);
            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.PersonID.Should().Be(1);
            response.Rowguid.Should().Be(Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"));
        }
Beispiel #3
0
        public void MapBOToModel()
        {
            var mapper = new BOLBusinessEntityContactMapper();
            BOBusinessEntityContact bo = new BOBusinessEntityContact();

            bo.SetProperties(1, 1, DateTime.Parse("1/1/1987 12:00:00 AM"), 1, Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"));
            ApiBusinessEntityContactResponseModel response = mapper.MapBOToModel(bo);

            response.BusinessEntityID.Should().Be(1);
            response.ContactTypeID.Should().Be(1);
            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.PersonID.Should().Be(1);
            response.Rowguid.Should().Be(Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"));
        }
        public void MapEFToBO()
        {
            var mapper = new DALBusinessEntityContactMapper();
            BusinessEntityContact entity = new BusinessEntityContact();

            entity.SetProperties(1, 1, DateTime.Parse("1/1/1987 12:00:00 AM"), 1, Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"));

            BOBusinessEntityContact response = mapper.MapEFToBO(entity);

            response.BusinessEntityID.Should().Be(1);
            response.ContactTypeID.Should().Be(1);
            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.PersonID.Should().Be(1);
            response.Rowguid.Should().Be(Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"));
        }