Example #1
0
            public IEnumerator WHEN_IfMeasureCalledFunctionCalled_THEN_ValueOfMeasureEndReturned()
            {
                bool actualValue = BatterySessionManagement.IfMeasureCalled();

                yield return(null);

                Assert.AreEqual(BatterySessionManagement.measureEnd, actualValue);
            }
Example #2
0
        /// <summary>
        /// The Update function
        /// calls the functions to get the calculated scores to be displayed on
        /// the screen.
        /// </summary>
        private void Update()
        {
            // If the Ability.Measure() function is called in BatterySessionManagement
            // and the Text is not filled yet
            if (!isFilled && BatterySessionManagement.IfMeasureCalled())
            {
                // Call the function to calculate and update subscore values
                subScoreSeq = AbilityManagement.GetSubScoreSeq();
                // Call the function to calculate the overall cognitive or motor level
                overallScoreSeq = AbilityManagement.GetOverallScoreSeq();

                // Update the text shown on the screen to show the cognitive and motor levels
                GetScoreAndLevel();

                // Toggle the boolean to indicate that the text values for the levels have been filled
                isFilled = true;
            }
        }