private WasteAdditionalInformation(string constituent, decimal minConcentration, decimal maxConcentration, WasteInformationType wasteInformationType) { Constituent = constituent; MinConcentration = minConcentration; MaxConcentration = maxConcentration; WasteInformationType = wasteInformationType; }
private void AssertExpectedCompositionPercentageUnits(string constituent, decimal max, decimal min, WasteInformationType wasteInformationType, ChemicalCompositionPercentages result) { var name = string.Empty; if (wasteInformationType == WasteInformationType.HeavyMetals || wasteInformationType == WasteInformationType.NetCalorificValue) { name = wasteInformationType == WasteInformationType.HeavyMetals ? constituent + " mg/kg" : constituent + " MJ/kg"; } else { name = constituent + " wt/wt %"; } Assert.Equal(name, result.Name); Assert.Equal(max.ToString("N"), result.Max); Assert.Equal(min.ToString("N"), result.Min); }
public void GetWasteAdditionalInformationCompositonPercentages_ReturnExpectedResult(string constituent, decimal min, decimal max, WasteInformationType type) { wasteType.WasteAdditionalInformation = new List <WasteAdditionalInformation> { WasteAdditionalInformation.CreateWasteAdditionalInformation(constituent, min, max, type) }; var result = formatter.GetAdditionalInformationChemicalCompositionPercentages(wasteType.WasteAdditionalInformation); AssertExpectedCompositionPercentageUnits(constituent, max, min, type, result.Single()); }
public static WasteAdditionalInformation CreateWasteAdditionalInformation(string constituent, decimal minConcentration, decimal maxConcentration, WasteInformationType wasteInformationType) { return new WasteAdditionalInformation(constituent, minConcentration, maxConcentration, wasteInformationType); }
public static WasteAdditionalInformation CreateWasteAdditionalInformation(string constituent, decimal minConcentration, decimal maxConcentration, WasteInformationType wasteInformationType) { return(new WasteAdditionalInformation(constituent, minConcentration, maxConcentration, wasteInformationType)); }
public void GetWasteAdditionalInformationCompositonPercentages_ReturnExpectedResult(string constituent, decimal min, decimal max, WasteInformationType type) { wasteType.WasteAdditionalInformation = new List<WasteAdditionalInformation> { WasteAdditionalInformation.CreateWasteAdditionalInformation(constituent, min, max, type) }; var result = formatter.GetAdditionalInformationChemicalCompositionPercentages(wasteType.WasteAdditionalInformation); AssertExpectedCompositionPercentageUnits(constituent, max, min, type, result.Single()); }