Exemple #1
0
        public void MapEFToBOList()
        {
            var   mapper = new DALStoreMapper();
            Store entity = new Store();

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

            List <BOStore> response = mapper.MapEFToBO(new List <Store>()
            {
                entity
            });

            response.Count.Should().Be(1);
        }
Exemple #2
0
        public void MapEFToBO()
        {
            var   mapper = new DALStoreMapper();
            Store entity = new Store();

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

            BOStore response = mapper.MapEFToBO(entity);

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