Example #1
0
        public static TrendEvaluation GetTrendEvaluation(TrendDirection trendDirection, TrendInterpretation trendInterpretation)
        {
            if (trendInterpretation == TrendInterpretation.Standard)
                switch (trendDirection)
                {
                    case TrendDirection.Decreasing:
                        return TrendEvaluation.DownBad;
                    case TrendDirection.Increasing:
                        return TrendEvaluation.UpGood;
                    case TrendDirection.None:
                        return TrendEvaluation.None;
                    case TrendDirection.Unchanged:
                        return TrendEvaluation.NoChangeNoOpinion;
                }

            if (trendInterpretation == TrendInterpretation.Inverse)
                switch (trendDirection)
                {
                    case TrendDirection.Decreasing:
                        return TrendEvaluation.DownGood;
                    case TrendDirection.Increasing:
                        return TrendEvaluation.UpBad;
                    case TrendDirection.None:
                        return TrendEvaluation.None;
                    case TrendDirection.Unchanged:
                        return TrendEvaluation.NoChangeNoOpinion;
                }

            return TrendEvaluation.None;
        }
        protected override void EstablishContext()
        {
            //Prepare supplied data collections
            suppliedDomainEntityType = "School";
            suppliedMetricMetadataNode = GetSuppliedMetricMetadataNode();
            suppliedGranularMetricValue = .55m;
            suppliedGoalInterpretation = TrendInterpretation.Standard;
            suppliedGoalValue = .50m;
            suppliedGranularMetric = GetSuppliedGranularMetric();

            //This is for the original values in the state object for the granular metric.
            originalStateDisplayStateText = "This should be overriden.";
            originalStateStateText = "Should maintain value.";
            originalStateStateType = MetricStateType.None;
        }