public void MapBOToModelList() { var mapper = new BOLSalesTerritoryMapper(); BOSalesTerritory bo = new BOSalesTerritory(); bo.SetProperties(1, 1m, 1m, "A", "A", DateTime.Parse("1/1/1987 12:00:00 AM"), "A", Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"), 1m, 1m); List <ApiSalesTerritoryResponseModel> response = mapper.MapBOToModel(new List <BOSalesTerritory>() { { bo } }); response.Count.Should().Be(1); }
public void MapBOToModel() { var mapper = new BOLSalesTerritoryMapper(); BOSalesTerritory bo = new BOSalesTerritory(); bo.SetProperties(1, 1m, 1m, "A", "A", DateTime.Parse("1/1/1987 12:00:00 AM"), "A", Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"), 1m, 1m); ApiSalesTerritoryResponseModel response = mapper.MapBOToModel(bo); response.CostLastYear.Should().Be(1m); response.CostYTD.Should().Be(1m); response.CountryRegionCode.Should().Be("A"); [email protected]().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.SalesLastYear.Should().Be(1m); response.SalesYTD.Should().Be(1m); response.TerritoryID.Should().Be(1); }