Exemplo n.º 1
0
        public void ComputeTest()
        {
            IObserver target   = CreateIObserver(); // TODO: Initialize to an appropriate value
            int       newValue = 1;                 // TODO: Initialize to an appropriate value
            double    avgValue = 0F;                // TODO: Initialize to an appropriate value
            int       count    = 1;                 // TODO: Initialize to an appropriate value
            double    expected = 2F;                // TODO: Initialize to an appropriate value
            double    actual;

            avgValue += target.Compute(newValue, avgValue, count);

            // Simulate adding new value
            newValue = 2;
            count++;

            avgValue += target.Compute(newValue, avgValue, count);

            // Simulate adding new value
            newValue = 3;
            count++;

            avgValue += target.Compute(newValue, avgValue, count);

            actual = avgValue;
            Assert.AreEqual(expected, actual);
            //Assert.Inconclusive("Verify the correctness of this test method.");
        }