public void GetWasteName(ChemicalComposition type, string expected) { var chemicalComposition = ChemicalComposition.RDF; if (type == ChemicalComposition.SRF) { chemicalComposition = ChemicalComposition.SRF; } else if (type == ChemicalComposition.Wood) { chemicalComposition = ChemicalComposition.Wood; } wasteType.ChemicalCompositionType = chemicalComposition; var result = formatter.GetWasteName(wasteType); Assert.Equal(expected, result); }
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(); }