Пример #1
0
        public static TreatmentType ToType(TreatmentTypeEnum enumValue)
        {
            switch (enumValue)
            {
            case TreatmentTypeEnum.Commercial:
                return(Commercial);

            case TreatmentTypeEnum.NonCommercial:
                return(NonCommercial);

            case TreatmentTypeEnum.Other:
                return(Other);

            case TreatmentTypeEnum.PrescribedFire:
                return(PrescribedFire);

            default:
                throw new ArgumentException(string.Format("Unable to map Enum: {0}", enumValue));
            }
        }
Пример #2
0
        public void InfrastructureExtraB_Every_Property_Has_Get_Set_Test()
        {
            string val1 = "Some text";

            infrastructureExtraB.InfrastructureReportTest = val1;
            Assert.AreEqual(val1, infrastructureExtraB.InfrastructureReportTest);
            string val2 = "Some text";

            infrastructureExtraB.InfrastructureText = val2;
            Assert.AreEqual(val2, infrastructureExtraB.InfrastructureText);
            string val3 = "Some text";

            infrastructureExtraB.SeeOtherMunicipalityText = val3;
            Assert.AreEqual(val3, infrastructureExtraB.SeeOtherMunicipalityText);
            string val4 = "Some text";

            infrastructureExtraB.CivicAddressText = val4;
            Assert.AreEqual(val4, infrastructureExtraB.CivicAddressText);
            string val5 = "Some text";

            infrastructureExtraB.LastUpdateContactText = val5;
            Assert.AreEqual(val5, infrastructureExtraB.LastUpdateContactText);
            string val6 = "Some text";

            infrastructureExtraB.InfrastructureTypeText = val6;
            Assert.AreEqual(val6, infrastructureExtraB.InfrastructureTypeText);
            string val7 = "Some text";

            infrastructureExtraB.FacilityTypeText = val7;
            Assert.AreEqual(val7, infrastructureExtraB.FacilityTypeText);
            string val8 = "Some text";

            infrastructureExtraB.AerationTypeText = val8;
            Assert.AreEqual(val8, infrastructureExtraB.AerationTypeText);
            string val9 = "Some text";

            infrastructureExtraB.PreliminaryTreatmentTypeText = val9;
            Assert.AreEqual(val9, infrastructureExtraB.PreliminaryTreatmentTypeText);
            string val10 = "Some text";

            infrastructureExtraB.PrimaryTreatmentTypeText = val10;
            Assert.AreEqual(val10, infrastructureExtraB.PrimaryTreatmentTypeText);
            string val11 = "Some text";

            infrastructureExtraB.SecondaryTreatmentTypeText = val11;
            Assert.AreEqual(val11, infrastructureExtraB.SecondaryTreatmentTypeText);
            string val12 = "Some text";

            infrastructureExtraB.TertiaryTreatmentTypeText = val12;
            Assert.AreEqual(val12, infrastructureExtraB.TertiaryTreatmentTypeText);
            string val13 = "Some text";

            infrastructureExtraB.TreatmentTypeText = val13;
            Assert.AreEqual(val13, infrastructureExtraB.TreatmentTypeText);
            string val14 = "Some text";

            infrastructureExtraB.DisinfectionTypeText = val14;
            Assert.AreEqual(val14, infrastructureExtraB.DisinfectionTypeText);
            string val15 = "Some text";

            infrastructureExtraB.CollectionSystemTypeText = val15;
            Assert.AreEqual(val15, infrastructureExtraB.CollectionSystemTypeText);
            string val16 = "Some text";

            infrastructureExtraB.AlarmSystemTypeText = val16;
            Assert.AreEqual(val16, infrastructureExtraB.AlarmSystemTypeText);
            int val17 = 45;

            infrastructureExtraB.InfrastructureID = val17;
            Assert.AreEqual(val17, infrastructureExtraB.InfrastructureID);
            int val18 = 45;

            infrastructureExtraB.InfrastructureTVItemID = val18;
            Assert.AreEqual(val18, infrastructureExtraB.InfrastructureTVItemID);
            int val19 = 45;

            infrastructureExtraB.PrismID = val19;
            Assert.AreEqual(val19, infrastructureExtraB.PrismID);
            int val20 = 45;

            infrastructureExtraB.TPID = val20;
            Assert.AreEqual(val20, infrastructureExtraB.TPID);
            int val21 = 45;

            infrastructureExtraB.LSID = val21;
            Assert.AreEqual(val21, infrastructureExtraB.LSID);
            int val22 = 45;

            infrastructureExtraB.SiteID = val22;
            Assert.AreEqual(val22, infrastructureExtraB.SiteID);
            int val23 = 45;

            infrastructureExtraB.Site = val23;
            Assert.AreEqual(val23, infrastructureExtraB.Site);
            string val24 = "Some text";

            infrastructureExtraB.InfrastructureCategory = val24;
            Assert.AreEqual(val24, infrastructureExtraB.InfrastructureCategory);
            InfrastructureTypeEnum val25 = (InfrastructureTypeEnum)3;

            infrastructureExtraB.InfrastructureType = val25;
            Assert.AreEqual(val25, infrastructureExtraB.InfrastructureType);
            FacilityTypeEnum val26 = (FacilityTypeEnum)3;

            infrastructureExtraB.FacilityType = val26;
            Assert.AreEqual(val26, infrastructureExtraB.FacilityType);
            bool val27 = true;

            infrastructureExtraB.IsMechanicallyAerated = val27;
            Assert.AreEqual(val27, infrastructureExtraB.IsMechanicallyAerated);
            int val28 = 45;

            infrastructureExtraB.NumberOfCells = val28;
            Assert.AreEqual(val28, infrastructureExtraB.NumberOfCells);
            int val29 = 45;

            infrastructureExtraB.NumberOfAeratedCells = val29;
            Assert.AreEqual(val29, infrastructureExtraB.NumberOfAeratedCells);
            AerationTypeEnum val30 = (AerationTypeEnum)3;

            infrastructureExtraB.AerationType = val30;
            Assert.AreEqual(val30, infrastructureExtraB.AerationType);
            PreliminaryTreatmentTypeEnum val31 = (PreliminaryTreatmentTypeEnum)3;

            infrastructureExtraB.PreliminaryTreatmentType = val31;
            Assert.AreEqual(val31, infrastructureExtraB.PreliminaryTreatmentType);
            PrimaryTreatmentTypeEnum val32 = (PrimaryTreatmentTypeEnum)3;

            infrastructureExtraB.PrimaryTreatmentType = val32;
            Assert.AreEqual(val32, infrastructureExtraB.PrimaryTreatmentType);
            SecondaryTreatmentTypeEnum val33 = (SecondaryTreatmentTypeEnum)3;

            infrastructureExtraB.SecondaryTreatmentType = val33;
            Assert.AreEqual(val33, infrastructureExtraB.SecondaryTreatmentType);
            TertiaryTreatmentTypeEnum val34 = (TertiaryTreatmentTypeEnum)3;

            infrastructureExtraB.TertiaryTreatmentType = val34;
            Assert.AreEqual(val34, infrastructureExtraB.TertiaryTreatmentType);
            TreatmentTypeEnum val35 = (TreatmentTypeEnum)3;

            infrastructureExtraB.TreatmentType = val35;
            Assert.AreEqual(val35, infrastructureExtraB.TreatmentType);
            DisinfectionTypeEnum val36 = (DisinfectionTypeEnum)3;

            infrastructureExtraB.DisinfectionType = val36;
            Assert.AreEqual(val36, infrastructureExtraB.DisinfectionType);
            CollectionSystemTypeEnum val37 = (CollectionSystemTypeEnum)3;

            infrastructureExtraB.CollectionSystemType = val37;
            Assert.AreEqual(val37, infrastructureExtraB.CollectionSystemType);
            AlarmSystemTypeEnum val38 = (AlarmSystemTypeEnum)3;

            infrastructureExtraB.AlarmSystemType = val38;
            Assert.AreEqual(val38, infrastructureExtraB.AlarmSystemType);
            double val39 = 87.9D;

            infrastructureExtraB.DesignFlow_m3_day = val39;
            Assert.AreEqual(val39, infrastructureExtraB.DesignFlow_m3_day);
            double val40 = 87.9D;

            infrastructureExtraB.AverageFlow_m3_day = val40;
            Assert.AreEqual(val40, infrastructureExtraB.AverageFlow_m3_day);
            double val41 = 87.9D;

            infrastructureExtraB.PeakFlow_m3_day = val41;
            Assert.AreEqual(val41, infrastructureExtraB.PeakFlow_m3_day);
            int val42 = 45;

            infrastructureExtraB.PopServed = val42;
            Assert.AreEqual(val42, infrastructureExtraB.PopServed);
            bool val43 = true;

            infrastructureExtraB.CanOverflow = val43;
            Assert.AreEqual(val43, infrastructureExtraB.CanOverflow);
            double val44 = 87.9D;

            infrastructureExtraB.PercFlowOfTotal = val44;
            Assert.AreEqual(val44, infrastructureExtraB.PercFlowOfTotal);
            double val45 = 87.9D;

            infrastructureExtraB.TimeOffset_hour = val45;
            Assert.AreEqual(val45, infrastructureExtraB.TimeOffset_hour);
            string val46 = "Some text";

            infrastructureExtraB.TempCatchAllRemoveLater = val46;
            Assert.AreEqual(val46, infrastructureExtraB.TempCatchAllRemoveLater);
            double val47 = 87.9D;

            infrastructureExtraB.AverageDepth_m = val47;
            Assert.AreEqual(val47, infrastructureExtraB.AverageDepth_m);
            int val48 = 45;

            infrastructureExtraB.NumberOfPorts = val48;
            Assert.AreEqual(val48, infrastructureExtraB.NumberOfPorts);
            double val49 = 87.9D;

            infrastructureExtraB.PortDiameter_m = val49;
            Assert.AreEqual(val49, infrastructureExtraB.PortDiameter_m);
            double val50 = 87.9D;

            infrastructureExtraB.PortSpacing_m = val50;
            Assert.AreEqual(val50, infrastructureExtraB.PortSpacing_m);
            double val51 = 87.9D;

            infrastructureExtraB.PortElevation_m = val51;
            Assert.AreEqual(val51, infrastructureExtraB.PortElevation_m);
            double val52 = 87.9D;

            infrastructureExtraB.VerticalAngle_deg = val52;
            Assert.AreEqual(val52, infrastructureExtraB.VerticalAngle_deg);
            double val53 = 87.9D;

            infrastructureExtraB.HorizontalAngle_deg = val53;
            Assert.AreEqual(val53, infrastructureExtraB.HorizontalAngle_deg);
            double val54 = 87.9D;

            infrastructureExtraB.DecayRate_per_day = val54;
            Assert.AreEqual(val54, infrastructureExtraB.DecayRate_per_day);
            double val55 = 87.9D;

            infrastructureExtraB.NearFieldVelocity_m_s = val55;
            Assert.AreEqual(val55, infrastructureExtraB.NearFieldVelocity_m_s);
            double val56 = 87.9D;

            infrastructureExtraB.FarFieldVelocity_m_s = val56;
            Assert.AreEqual(val56, infrastructureExtraB.FarFieldVelocity_m_s);
            double val57 = 87.9D;

            infrastructureExtraB.ReceivingWaterSalinity_PSU = val57;
            Assert.AreEqual(val57, infrastructureExtraB.ReceivingWaterSalinity_PSU);
            double val58 = 87.9D;

            infrastructureExtraB.ReceivingWaterTemperature_C = val58;
            Assert.AreEqual(val58, infrastructureExtraB.ReceivingWaterTemperature_C);
            int val59 = 45;

            infrastructureExtraB.ReceivingWater_MPN_per_100ml = val59;
            Assert.AreEqual(val59, infrastructureExtraB.ReceivingWater_MPN_per_100ml);
            double val60 = 87.9D;

            infrastructureExtraB.DistanceFromShore_m = val60;
            Assert.AreEqual(val60, infrastructureExtraB.DistanceFromShore_m);
            int val61 = 45;

            infrastructureExtraB.SeeOtherMunicipalityTVItemID = val61;
            Assert.AreEqual(val61, infrastructureExtraB.SeeOtherMunicipalityTVItemID);
            int val62 = 45;

            infrastructureExtraB.CivicAddressTVItemID = val62;
            Assert.AreEqual(val62, infrastructureExtraB.CivicAddressTVItemID);
            DateTime val63 = new DateTime(2010, 3, 4);

            infrastructureExtraB.LastUpdateDate_UTC = val63;
            Assert.AreEqual(val63, infrastructureExtraB.LastUpdateDate_UTC);
            int val64 = 45;

            infrastructureExtraB.LastUpdateContactTVItemID = val64;
            Assert.AreEqual(val64, infrastructureExtraB.LastUpdateContactTVItemID);
            bool val65 = true;

            infrastructureExtraB.HasErrors = val65;
            Assert.AreEqual(val65, infrastructureExtraB.HasErrors);
            IEnumerable <ValidationResult> val198 = new List <ValidationResult>()
            {
                new ValidationResult("First CSSPError Message")
            }.AsEnumerable();

            infrastructureExtraB.ValidationResults = val198;
            Assert.AreEqual(val198, infrastructureExtraB.ValidationResults);
        }