public void MapEFToBOList() { var mapper = new DALSalesTerritoryHistoryMapper(); SalesTerritoryHistory entity = new SalesTerritoryHistory(); entity.SetProperties(1, DateTime.Parse("1/1/1987 12:00:00 AM"), DateTime.Parse("1/1/1987 12:00:00 AM"), Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"), DateTime.Parse("1/1/1987 12:00:00 AM"), 1); List <BOSalesTerritoryHistory> response = mapper.MapEFToBO(new List <SalesTerritoryHistory>() { entity }); response.Count.Should().Be(1); }
public void MapEFToBO() { var mapper = new DALSalesTerritoryHistoryMapper(); SalesTerritoryHistory entity = new SalesTerritoryHistory(); entity.SetProperties(1, DateTime.Parse("1/1/1987 12:00:00 AM"), DateTime.Parse("1/1/1987 12:00:00 AM"), Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"), DateTime.Parse("1/1/1987 12:00:00 AM"), 1); BOSalesTerritoryHistory response = mapper.MapEFToBO(entity); response.BusinessEntityID.Should().Be(1); response.EndDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.Rowguid.Should().Be(Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da")); response.StartDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.TerritoryID.Should().Be(1); }