Exemplo n.º 1
0
        public void uses_the_specific_analysis_type_when_one_set_in_ctor(AnalyticType type)
        {
            var seq = new MeasuredKeySequence(type);

            seq.Start(string.Empty);
            seq.Stop(string.Empty);
            Assert.That(seq.Analysis, Has.One.Matches <IAnalytic>(d => d.GetAnalyticType() == type));
        }
Exemplo n.º 2
0
        public static IAnalytic Create(AnalyticType type, AnalyticData data)
        {
            if (type == AnalyticType.Speed)
            {
                return(new Speed(data));
            }
            else if (type == AnalyticType.Accuracy)
            {
                return(new Accuracy(data));
            }

            throw new NotImplementedException();
        }
Exemplo n.º 3
0
        void BindModel(Model model, AnalyticType type)
        {
            if (type == AnalyticType.RULE)
            {
                groupModules.Visibility = System.Windows.Visibility.Collapsed;
            }
            if (type == AnalyticType.MODULE)
            {
                groupRules.Visibility = System.Windows.Visibility.Collapsed;
            }

            //TODO: Stub fix for #225 Remove this with plugin functionality
            last = activityContext.container.Resolve <ILastChangedModule>();
            if (last.module != null)
            {
                //CompleteWith(() => Success(new Result.ConfigureModule(last.module)));
                Success(new Result.ConfigureModule(last.module));
            }
            //

            modulesList.MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(modulesList_MouseDoubleClick);
            rulesList.MouseDoubleClick   += new System.Windows.Input.MouseButtonEventHandler(rulesList_MouseDoubleClick);
        }
Exemplo n.º 4
0
        public void factory_returns_correct_IAnalytic_by_type(AnalyticType type, Type result)
        {
            IAnalytic analytic = BaseAnalytic.Create(type, null);

            Assert.That(analytic, Is.TypeOf(result));
        }
Exemplo n.º 5
0
 public MeasuredKeySequence(AnalyticType analytic)
     : this(new List <AnalyticType>() { analytic })
 {
 }