コード例 #1
0
 private WasteAdditionalInformation(string constituent, decimal minConcentration, decimal maxConcentration, WasteInformationType wasteInformationType)
 {
     Constituent = constituent;
     MinConcentration = minConcentration;
     MaxConcentration = maxConcentration;
     WasteInformationType = wasteInformationType;
 }
コード例 #2
0
 private WasteAdditionalInformation(string constituent, decimal minConcentration, decimal maxConcentration, WasteInformationType wasteInformationType)
 {
     Constituent          = constituent;
     MinConcentration     = minConcentration;
     MaxConcentration     = maxConcentration;
     WasteInformationType = wasteInformationType;
 }
コード例 #3
0
        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);
        }
コード例 #4
0
        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());
        }
コード例 #5
0
 public static WasteAdditionalInformation CreateWasteAdditionalInformation(string constituent, decimal minConcentration, decimal maxConcentration, WasteInformationType wasteInformationType)
 {
     return new WasteAdditionalInformation(constituent, minConcentration, maxConcentration, wasteInformationType);
 }
コード例 #6
0
 public static WasteAdditionalInformation CreateWasteAdditionalInformation(string constituent, decimal minConcentration, decimal maxConcentration, WasteInformationType wasteInformationType)
 {
     return(new WasteAdditionalInformation(constituent, minConcentration, maxConcentration, wasteInformationType));
 }
コード例 #7
0
        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);
        }
コード例 #8
0
        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());
        }