예제 #1
0
        public void TestGetAccumulatedEnergy()
        {
            var input    = new double[] { 4, 2, 1, 5, 1, 5, 8, 9, 3 };
            var expected = 226d;

            Assert.AreEqual(expected, WaveMath.GetAccumulatedEnergy(input));

            input    = new double[] { };
            expected = 0d;
            Assert.AreEqual(expected, WaveMath.GetAccumulatedEnergy(input));
        }