public void CopyIntoSiphon() { var siphon = new Culvert { IsSiphon = true }; var culvert = new Culvert { FlowDirection = FlowDirection.Both }; siphon.CopyFrom(culvert); Assert.IsFalse(siphon.IsSiphon); Assert.AreEqual(FlowDirection.Both, siphon.FlowDirection); }
public void CopyFrom() { var targetCulvert = new Culvert("target"); var sourceCulvert = new Culvert("source") { Diameter = 20.0, FlowDirection = FlowDirection.Positive, Friction = 3.0, FrictionType = CulvertFrictionType.WhiteColebrook, GateInitialOpening = 4.2, //GateOpeningLossCoefficientFunction = , GeometryType = CulvertGeometryType.SteelCunette, Height = 5.0, InletLevel = 3.11, InletLossCoefficient = 0.42, IsGated = true, IsSiphon = true, OutletLevel = 0.42, OutletLossCoefficient = 0.42, Radius = 42.0, Radius1 = 42.1, Radius2 = 42.3, Radius3 = 42.4, SiphonOffLevel = 1.2, SiphonOnLevel = 1.2, TabulatedCrossSectionDefinition = new CrossSectionDefinitionZW(), Width = 14.0, GroundLayerRoughness = 0.42, GroundLayerThickness = 4.2 }; targetCulvert.CopyFrom(sourceCulvert); Assert.AreEqual(sourceCulvert.Diameter, targetCulvert.Diameter); Assert.AreEqual(sourceCulvert.FlowDirection, targetCulvert.FlowDirection); Assert.AreEqual(sourceCulvert.Friction, targetCulvert.Friction); Assert.AreEqual(sourceCulvert.FrictionType, targetCulvert.FrictionType); Assert.AreEqual(sourceCulvert.GateInitialOpening, targetCulvert.GateInitialOpening); Assert.AreEqual(sourceCulvert.GeometryType, targetCulvert.GeometryType); Assert.AreEqual(sourceCulvert.Height, targetCulvert.Height); Assert.AreEqual(sourceCulvert.InletLevel, targetCulvert.InletLevel); Assert.AreEqual(sourceCulvert.OutletLossCoefficient, targetCulvert.OutletLossCoefficient); Assert.AreEqual(sourceCulvert.Radius, targetCulvert.Radius); Assert.AreEqual(sourceCulvert.SiphonOffLevel, targetCulvert.SiphonOffLevel); Assert.AreEqual(sourceCulvert.TabulatedCrossSectionDefinition.CrossSectionType, targetCulvert.TabulatedCrossSectionDefinition.CrossSectionType); Assert.AreEqual(sourceCulvert.Width, targetCulvert.Width); Assert.AreEqual(sourceCulvert.GroundLayerThickness, targetCulvert.GroundLayerThickness); Assert.AreEqual(sourceCulvert.GroundLayerRoughness, targetCulvert.GroundLayerRoughness); Assert.AreNotEqual(sourceCulvert.Name, targetCulvert.Name); }