public WasteCompositionViewModel(WasteType wasteType, WasteCompositionFormatter formatter) { WasteName = formatter.GetWasteName(wasteType); Energy = formatter.GetEnergyEfficiencyString(wasteType); OptionalInformation = formatter.GetOptionalInformationTitle(wasteType); HasAnnex = wasteType.HasAnnex; SetWasteTypeDescription(wasteType); ChemicalComposition = wasteType.ChemicalCompositionType; Compositions = formatter.GetWasteCompositionPercentages(wasteType); AdditionalInfos = formatter.GetAdditionalInformationChemicalCompositionPercentages(wasteType.WasteAdditionalInformation); SetMergeDescriptionText(); }
public WasteCompositionViewModel(WasteType wasteType, WasteCompositionFormatter formatter) { WasteName = formatter.GetWasteName(wasteType); Energy = formatter.GetEnergyEfficiencyString(wasteType); OptionalInformation = formatter.GetOptionalInformationTitle(wasteType); HasAnnex = wasteType.HasAnnex; SetWasteTypeDescription(wasteType); ChemicalComposition = wasteType.ChemicalCompositionType; Compositions = formatter.GetWasteCompositionPercentages(wasteType); AdditionalInfos = formatter.GetAdditionalInformationChemicalCompositionPercentages(wasteType.WasteAdditionalInformation); SetMergeDescriptionText(); }
public void WasteTypeIsNull_ReturnsEmptyOptionalInformationTitle() { var result = formatter.GetOptionalInformationTitle(null); Assert.Equal(string.Empty, result); }