public void CrestLevel()
        {
            var formula = new FreeFormWeirFormula();
            var yValues = new[] { 1.0, 20.0 };
            var zValues = new[] { 3.0, 4.0 };

            formula.SetShape(yValues, zValues);
            Assert.AreEqual(formula.CrestLevel, 3, 1.0e-6);
        }
        public void CheckCrestForFreeFormWeirFormulaWithEmptyLineStringShape()
        {
            var formula = new FreeFormWeirFormula
            {
                Shape = new LineString(new ICoordinate[0])
            };

            Assert.AreEqual(0, formula.CrestLevel);
            Assert.AreEqual(0, formula.CrestWidth);
        }
 public void SetShape()
 {
     var formula = new FreeFormWeirFormula();
     var yValues = new[] {1.0, 20.0};
     var zValues = new[] {3.0, 4.0};
     formula.SetShape(yValues, zValues);
     Assert.AreEqual(yValues[0], formula.Y.ToArray()[0], 1.0e-6);
     Assert.AreEqual(yValues[1], formula.Y.ToArray()[1], 1.0e-6);
     Assert.AreEqual(zValues[0], formula.Z.ToArray()[0], 1.0e-6);
     Assert.AreEqual(zValues[1], formula.Z.ToArray()[1], 1.0e-6);
 }
        public void SetShape()
        {
            var formula = new FreeFormWeirFormula();
            var yValues = new[] { 1.0, 20.0 };
            var zValues = new[] { 3.0, 4.0 };

            formula.SetShape(yValues, zValues);
            Assert.AreEqual(yValues[0], formula.Y.ToArray()[0], 1.0e-6);
            Assert.AreEqual(yValues[1], formula.Y.ToArray()[1], 1.0e-6);
            Assert.AreEqual(zValues[0], formula.Z.ToArray()[0], 1.0e-6);
            Assert.AreEqual(zValues[1], formula.Z.ToArray()[1], 1.0e-6);
        }
        public void DefaultValues()
        {
            var formula = new FreeFormWeirFormula();

            Assert.AreEqual(2, formula.Y.Count());
        }
 public void DefaultValues()
 {
     var formula = new FreeFormWeirFormula();
     Assert.AreEqual(2,formula.Y.Count());
 }