コード例 #1
0
        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);
        }
コード例 #2
0
        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();
        }
コード例 #3
0
        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();
        }